Skip to content

Commit 4aab135

Browse files
author
James Morse
committed
arm64: mpam: Select ARCH_HAS_CPU_RESCTRL
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 simply 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. Tested-by: Gavin Shan <gshan@redhat.com> Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Tested-by: Peter Newman <peternewman@google.com> Tested-by: Zeng Heng <zengheng4@huawei.com> Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com> Tested-by: Jesse Chick <jessechick@os.amperecomputing.com> Reviewed-by: Zeng Heng <zengheng4@huawei.com> Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Co-developed-by: Ben Horgan <ben.horgan@arm.com> Signed-off-by: Ben Horgan <ben.horgan@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
1 parent efc775e commit 4aab135

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

arch/arm64/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,7 @@ config ARM64_TLB_RANGE
20172017
config ARM64_MPAM
20182018
bool "Enable support for MPAM"
20192019
select ARM64_MPAM_DRIVER
2020-
select ACPI_MPAM if ACPI
2020+
select ARCH_HAS_CPU_RESCTRL
20212021
help
20222022
Memory System Resource Partitioning and Monitoring (MPAM) is an
20232023
optional extension to the Arm architecture that allows each

arch/arm64/include/asm/resctrl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#include <linux/arm_mpam.h>

drivers/resctrl/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
menuconfig ARM64_MPAM_DRIVER
22
bool "MPAM driver"
33
depends on ARM64 && ARM64_MPAM
4+
select ACPI_MPAM if ACPI
45
help
56
Memory System Resource Partitioning and Monitoring (MPAM) driver for
67
System IP, e.g. caches and memory controllers.
@@ -22,3 +23,9 @@ config MPAM_KUNIT_TEST
2223
If unsure, say N.
2324

2425
endif
26+
27+
config ARM64_MPAM_RESCTRL_FS
28+
bool
29+
default y if ARM64_MPAM_DRIVER && RESCTRL_FS
30+
select RESCTRL_RMID_DEPENDS_ON_CLOSID
31+
select RESCTRL_ASSIGN_FIXED

drivers/resctrl/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
obj-$(CONFIG_ARM64_MPAM_DRIVER) += mpam.o
22
mpam-y += mpam_devices.o
3-
mpam-$(CONFIG_ARM_CPU_RESCTRL) += mpam_resctrl.o
3+
mpam-$(CONFIG_ARM64_MPAM_RESCTRL_FS) += mpam_resctrl.o
44

55
ccflags-$(CONFIG_ARM64_MPAM_DRIVER_DEBUG) += -DDEBUG

0 commit comments

Comments
 (0)