From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 183E5CAC582 for ; Fri, 12 Sep 2025 15:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=puMdyIIHvqqqXJRZG+w2G01SbwhDNuDItN0l/+tOcv0=; b=2zVMaINpRJKsHJx/RS9Gcoczt6 xMcria5KWSGlp9RGCWoQLqzknXwjwCxoqMtmFx76fTJv43uIhNPewZcxKIpRgIfpsLhO8uIzZwt44 LXUawucNZrUvrFSK9/ET5xp1F2v/uyxEzQj5ZvJmftmBV/wL1JW6jKFX0gwbYdugs3yGvQLIH2qDd j669ELVvk/DW8i3HEbJ7jkzAj3kZ91gTm35++qVfke+YTXDMrSvdQyVvNQeD560ZXQbOInOSzcUV+ cxe6ZFczG8mHe868YfD37F+17i5uh12rsc1bpmrd0fTVjFI6yfXTpw8K77Je9ZuNCoRkzeYYqaeyV +BpPzb2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ux5GS-0000000A5L5-0pEo; Fri, 12 Sep 2025 15:00:40 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ux5GQ-0000000A5KT-10UP for linux-arm-kernel@lists.infradead.org; Fri, 12 Sep 2025 15:00:39 +0000 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 01E5C16A3; Fri, 12 Sep 2025 08:00:28 -0700 (PDT) Received: from [10.1.196.46] (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B01D03F694; Fri, 12 Sep 2025 08:00:31 -0700 (PDT) Message-ID: <5eb4b7f0-37eb-47c9-a955-ed9db17fa1e5@arm.com> Date: Fri, 12 Sep 2025 16:00:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 20/29] arm_mpam: Allow configuration to be applied and restored during cpu online To: James Morse , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org Cc: 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 , Dave Martin , Koba Ko , Shanker Donthineni , fenghuay@nvidia.com, baisheng.gao@unisoc.com, Jonathan Cameron , Rob Herring , Rohit Mathew , Rafael Wysocki , Len Brown , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Catalin Marinas , Will Deacon , Greg Kroah-Hartman , Danilo Krummrich References: <20250910204309.20751-1-james.morse@arm.com> <20250910204309.20751-21-james.morse@arm.com> From: Ben Horgan Content-Language: en-US In-Reply-To: <20250910204309.20751-21-james.morse@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250912_080038_319144_01557661 X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi James, On 9/10/25 21:43, James Morse wrote: > When CPUs come online the MSC's original configuration should be restored. > > Add struct mpam_config to hold the configuration. This has a bitmap of > features that were modified. Once the maximum partid is known, allocate > a configuration array for each component, and reprogram each RIS > configuration from this. > > CC: Dave Martin > Signed-off-by: James Morse > --- > Changes since v1: > * Switched entry_rcu to srcu versions. > > Changes since RFC: > * Added a comment about the ordering around max_partid. > * Allocate configurations after interrupts are registered to reduce churn. > * Added mpam_assert_partid_sizes_fixed(); > * Make reset use an all-ones instead of zero config. > --- > drivers/resctrl/mpam_devices.c | 269 +++++++++++++++++++++++++++++--- > drivers/resctrl/mpam_internal.h | 29 +++- > 2 files changed, 271 insertions(+), 27 deletions(-) > Reviewed-by: Ben Horgan Thanks, Ben