3 Commits
Author SHA1 Message Date
James Morse 4aab135bda 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 <[email protected]>
Tested-by: Shaopeng Tan <[email protected]>
Tested-by: Peter Newman <[email protected]>
Tested-by: Zeng Heng <[email protected]>
Tested-by: Punit Agrawal <[email protected]>
Tested-by: Jesse Chick <[email protected]>
Reviewed-by: Zeng Heng <[email protected]>
Reviewed-by: Shaopeng Tan <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Gavin Shan <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Co-developed-by: Ben Horgan <[email protected]>
Signed-off-by: Ben Horgan <[email protected]>
Signed-off-by: James Morse <[email protected]>
2026-03-27 15:32:11 +00:00
James Morse 09e61daf8e arm_mpam: resctrl: Add boilerplate cpuhp and domain allocation
resctrl has its own data structures to describe its resources. We can't use
these directly as we play tricks with the 'MBA' resource, picking the MPAM
controls or monitors that best apply. We may export the same component as
both L3 and MBA.

Add mpam_resctrl_res[] as the array of class->resctrl mappings we are
exporting, and add the cpuhp hooks that allocated and free the resctrl
domain structures. Only the mpam control feature are considered here and
monitor support will be added later.

While we're here, plumb in a few other obvious things.

CONFIG_ARM_CPU_RESCTRL is used to allow this code to be built even though
it can't yet be linked against resctrl.

Tested-by: Gavin Shan <[email protected]>
Tested-by: Shaopeng Tan <[email protected]>
Tested-by: Peter Newman <[email protected]>
Tested-by: Zeng Heng <[email protected]>
Tested-by: Punit Agrawal <[email protected]>
Tested-by: Jesse Chick <[email protected]>
Reviewed-by: Zeng Heng <[email protected]>
Reviewed-by: Shaopeng Tan <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Gavin Shan <[email protected]>
Co-developed-by: Ben Horgan <[email protected]>
Signed-off-by: Ben Horgan <[email protected]>
Signed-off-by: James Morse <[email protected]>
2026-03-27 15:29:27 +00:00
James Morse f04046f257 arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate
Probing MPAM is convoluted. MSCs that are integrated with a CPU may
only be accessible from those CPUs, and they may not be online.
Touching the hardware early is pointless as MPAM can't be used until
the system-wide common values for num_partid and num_pmg have been
discovered.

Start with driver probe/remove and mapping the MSC.

Cc: Carl Worth <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Fenghua Yu <[email protected]>
Reviewed-by: Shaopeng Tan <[email protected]>
Tested-by: Fenghua Yu <[email protected]>
Tested-by: Shaopeng Tan <[email protected]>
Tested-by: Peter Newman <[email protected]>
Tested-by: Carl Worth <[email protected]>
Tested-by: Gavin Shan <[email protected]>
Tested-by: Zeng Heng <[email protected]>
Tested-by: Hanjun Guo <[email protected]>
Signed-off-by: James Morse <[email protected]>
Signed-off-by: Ben Horgan <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
2025-11-19 18:34:20 +00:00