Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp436415lqg; Thu, 11 Apr 2024 07:26:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUaSBuN1njrxczm/Leme8iIfKF/OuqvGv2IvS2WF/MhvN8qFdhxLhCucxkHnHMKoh9Giwlid2hXBDa4CLvKRp+nJiC0hKcJe8GwmLKkwg== X-Google-Smtp-Source: AGHT+IH7yx1YjBuPMIOLarKkNpfEIY9PXYOkdtWO97zSfxgRa2qQ6PttUraI5fwdGvFjR1s/7Z4d X-Received: by 2002:a17:907:1c9f:b0:a4e:24e6:9880 with SMTP id nb31-20020a1709071c9f00b00a4e24e69880mr2710008ejc.33.1712845606257; Thu, 11 Apr 2024 07:26:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712845606; cv=pass; d=google.com; s=arc-20160816; b=E+507wZ0IVCKADppFVDECbEmFYAbjklDtaCht8LdLBy+JpgEk3PdE9jpZs/48lDxrN EfcvEraC2CxUgcQLh9lkcFl6IrMpevU//z8QKEtmWKl+7FKPzW+Nd3voWQKRyyJRrF2W QhSodke4le+iwbFZ0V8OxXFFsFs3hdRHIFr47pOd2EpjJw06a8XfGT+nD5ccAao/U2eL XEGee05M/89u0KYIN4QGKxpMixnQqAXGay8qpOpqKqu8eGI0IGQGEvObz6Tls1b994bP Ffyrsb4pwqVPB6kwSbILc6spcy1J5oz97oQLBrs2lAeZk2zde5sEqinPRU77PZS7h+fD r1AQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=lu2Eb+KwZq1Xd7NEjppKyalQa4qknayZ+lssiUn8IbA=; fh=QpfXcl1MWRNwK/PrSFDaf8vyLNOqSjtq+qtJ/l97qlo=; b=KOQPRszLq80snPTiZzp6Xl2lJ+ohFDQY4qRcHJnMV0tsYFjyT0py1t/5khDdHSlEYU 89d75c5kc7JY9Jj7Vtw17Jq0HN3Z2GdFLo1EsldyF9NawCj+VNzy5kWbw+heNu3ZHinH eKl2Up2BrRBihJecBk9e/Y8V4nxwpGy43dF/USS+qwr7xswKK3L5+butTR1wC1XxdohE cKYOWHtLmpX2Lg4c2w3YN9jbRIrC2Pwt5yI7yLaOUzM6/bT+D0UsTwNc34aAjRer0XOl +l3f66hZE8r8CguG3Vic8Agk52IFAhlbyMjB16E5IXhxuHVViKrIbJQ7LJfxXsrfuOik paVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-140641-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140641-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b20-20020a170906039400b00a46e7baca1fsi814778eja.843.2024.04.11.07.26.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 07:26:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140641-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-140641-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140641-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EE8301F2176F for ; Thu, 11 Apr 2024 14:26:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D3C114EC44; Thu, 11 Apr 2024 14:26:39 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65B8614E2DE for ; Thu, 11 Apr 2024 14:26:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712845598; cv=none; b=Df/AmOynunrvhbazAknlbCTJv0qybZhW7gCMp4w915VGwNnCUiQRTGMovXAty3mL9pYjNngQPApsjaCeL+9s8xqRlAbXhkBrpNnnUKWvlPF45CLf8b8p0XT0Q2z11+aXNRTZursdqEorzlA35EIuG1f2YHdsf6Rv6E8VPjEKru0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712845598; c=relaxed/simple; bh=vXcj9FIhldT33DZgqnk2KkFdu+VNhPskgkJZsxZ47rQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kU3kgstxpOL0hRN6L5m88WC/VH2ikKsbnCdNYRUEQu5bBBfG13Qtb8gr7AiGFEcpgqO7ii4eUGoOIpr4GJt1Zu8lNCZrV611UvncIzjsgDL118VYQxlK95v3r/C4UPGTwiRddYpoHyQQzvsNl+NyyFwp+yj2lQNfHLDm446BVzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5B362339; Thu, 11 Apr 2024 07:27:06 -0700 (PDT) Received: from e133380.arm.com (e133380.arm.com [10.1.197.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0888E3F64C; Thu, 11 Apr 2024 07:26:33 -0700 (PDT) Date: Thu, 11 Apr 2024 15:26:31 +0100 From: Dave Martin To: Reinette Chatre Cc: James Morse , x86@kernel.org, linux-kernel@vger.kernel.org, Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Rex Nie Subject: Re: [PATCH v1 28/31] x86/resctrl: Drop __init/__exit on assorted symbols Message-ID: References: <20240321165106.31602-1-james.morse@arm.com> <20240321165106.31602-29-james.morse@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Apr 08, 2024 at 08:32:36PM -0700, Reinette Chatre wrote: > Hi James, > > On 3/21/2024 9:51 AM, James Morse wrote: > > Because ARM's MPAM controls are probed using MMIO, resctrl can't be > > initialised until enough CPUs are online to have determined the > > system-wide supported num_closid. Arm64 also supports 'late onlined > > secondaries', where only a subset of CPUs are online during boot. > > > > These two combine to mean the MPAM driver may not be able to initialise > > resctrl until user-space has brought 'enough' CPUs online. > > > > To allow MPAM to initialise resctrl after __init text has been free'd, > > remove all the __init markings from resctrl. > > > > The existing __exit markings cause these functions to be removed by the > > linker as it has never been possible to build resctrl as a module. MPAM > > has an error interrupt which causes the driver to reset and disable > > itself. Remove the __exit markings to allow the MPAM driver to tear down > > resctrl when an error occurs. > > Obviously for the reasons you state this code has never been exercised. > Were you able to test this error interrupt flow yet? > > Reinette > I think this will have to wait for James to respond. There is code to tear down resctrl in response to an MPAM error interrupt, but I don't know how it has been exercised so far (if at all). https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/tree/drivers/platform/mpam/mpam_devices.c?h=mpam/snapshot/v6.7-rc2#n1940 Cheers ---Dave