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 8634219CD06 for ; Tue, 9 Dec 2025 16:33:16 +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=1765297998; cv=none; b=hYpBP+iTzeXEaOAMETUC5Um8Rn9RzGoIxSPH+jwzv8kHWPB5uprPh92efe27qhHeLkFtaPoZ5JuRFnP5SUYesz1C7+QaIC4O0Wt/RJ64XwRO2hss7XDrvkaUlrRCBi1TpvILFjTy0bKYAFaS5p2w/tEqWYlj6VokKfPwvqJl5WA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765297998; c=relaxed/simple; bh=XZp92z+M9ZMq8wAxAIYRHuVNwNbB7ra1wglPJBwCVuA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OfYQ28G+xqyaUeTwdXOhF0qvtGDUXTf7C6b4prWQeJYhMhHOMmoKWV1s1h6ixGkRwQeHpS5jILKCoQdXjz4XDV+D5DLhgYKgqSlLgQsww5tYOg7rkwmaDNd2Q4kdwuO9D5aNITTZtG8MHA9zgeCYttgbI69Y0Bi7iZgJXXt5Ekw= 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 988DB175D; Tue, 9 Dec 2025 08:33:08 -0800 (PST) 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 86C293F73B; Tue, 9 Dec 2025 08:33:12 -0800 (PST) Message-ID: <4e491c89-a63d-4c13-a0f4-9883a6bc6407@arm.com> Date: Tue, 9 Dec 2025 16:33:11 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 28/38] arm64: mpam: Select ARCH_HAS_CPU_RESCTRL To: James Morse , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.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 , Gavin Shan , rohit.mathew@arm.com, reinette.chatre@intel.com, Punit Agrawal References: <20251205215901.17772-1-james.morse@arm.com> <20251205215901.17772-29-james.morse@arm.com> From: Ben Horgan Content-Language: en-US In-Reply-To: <20251205215901.17772-29-james.morse@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi James, On 12/5/25 21:58, James Morse wrote: > Enough MPAM support is present to enable ARCH_HAS_CPU_RESCTRL. > Let it rip^Wlink! > > ARCH_HAS_CPU_RESCTRL indicates resctrl can be enabled. It is enabled > by the arch code sipmly because it has 'arch' in its name. > > This removes ARM_CPU_RESCTRL as a mimic of X86_CPU_RESCTRL. > While here, move the ACPI dependency to the driver's Kconfig file. Mention we're know longer hiding behind CONFIG_EXPERT. > > Signed-off-by: James Morse > --- > arch/arm64/Kconfig | 4 ++-- > arch/arm64/include/asm/resctrl.h | 2 ++ > drivers/resctrl/Kconfig | 9 ++++++++- > drivers/resctrl/Makefile | 2 +- > 4 files changed, 13 insertions(+), 4 deletions(-) > create mode 100644 arch/arm64/include/asm/resctrl.h > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 558baa9e7c08..e67885ac7717 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -2025,8 +2025,8 @@ config ARM64_TLB_RANGE > > config ARM64_MPAM > bool "Enable support for MPAM" > - select ARM64_MPAM_DRIVER if EXPERT # does nothing yet > - select ACPI_MPAM if ACPI > + select ARM64_MPAM_DRIVER > + select ARCH_HAS_CPU_RESCTRL > help > Memory System Resource Partitioning and Monitoring (MPAM) is an > optional extension to the Arm architecture that allows each > diff --git a/arch/arm64/include/asm/resctrl.h b/arch/arm64/include/asm/resctrl.h > new file mode 100644 > index 000000000000..b506e95cf6e3 > --- /dev/null > +++ b/arch/arm64/include/asm/resctrl.h > @@ -0,0 +1,2 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#include > diff --git a/drivers/resctrl/Kconfig b/drivers/resctrl/Kconfig > index c808e0470394..672abea3b03c 100644 > --- a/drivers/resctrl/Kconfig > +++ b/drivers/resctrl/Kconfig > @@ -1,6 +1,7 @@ > menuconfig ARM64_MPAM_DRIVER > bool "MPAM driver" > - depends on ARM64 && ARM64_MPAM && EXPERT > + depends on ARM64 && ARM64_MPAM > + select ACPI_MPAM if ACPI > help > Memory System Resource Partitioning and Monitoring (MPAM) driver for > System IP, e.g. caches and memory controllers. > @@ -22,3 +23,9 @@ config MPAM_KUNIT_TEST > If unsure, say N. > > endif > + > +config ARM64_MPAM_RESCTRL_FS > + bool > + default y if ARM64_MPAM_DRIVER && RESCTRL_FS > + select RESCTRL_RMID_DEPENDS_ON_CLOSID > + select RESCTRL_ASSIGN_FIXED > diff --git a/drivers/resctrl/Makefile b/drivers/resctrl/Makefile > index 40beaf999582..4f6d0e81f9b8 100644 > --- a/drivers/resctrl/Makefile > +++ b/drivers/resctrl/Makefile > @@ -1,5 +1,5 @@ > obj-$(CONFIG_ARM64_MPAM_DRIVER) += mpam.o > mpam-y += mpam_devices.o > -mpam-$(CONFIG_ARM_CPU_RESCTRL) += mpam_resctrl.o > +mpam-$(CONFIG_ARM64_MPAM_RESCTRL_FS) += mpam_resctrl.o > > ccflags-$(CONFIG_ARM64_MPAM_DRIVER_DEBUG) += -DDEBUG Thanks, Ben