]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm_mpam: resctrl: Add boilerplate cpuhp and domain allocation
authorJames Morse <james.morse@arm.com>
Fri, 13 Mar 2026 14:45:51 +0000 (14:45 +0000)
committerJames Morse <james.morse@arm.com>
Fri, 27 Mar 2026 15:29:27 +0000 (15:29 +0000)
commit09e61daf8e96b9bdb04dd112bdecf9382fd3f919
tree6914165fc0390184f419a1a7f569e2f45de904e7
parent67faed4ccb4f4b8055f50e9cc5670f1fc09ea287
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 <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>
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>
drivers/resctrl/Makefile
drivers/resctrl/mpam_devices.c
drivers/resctrl/mpam_internal.h
drivers/resctrl/mpam_resctrl.c [new file with mode: 0644]
include/linux/arm_mpam.h