From mboxrd@z Thu Jan 1 00:00:00 1970 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