]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm_mpam: resctrl: Allow resctrl to allocate monitors
authorJames Morse <james.morse@arm.com>
Fri, 13 Mar 2026 14:46:06 +0000 (14:46 +0000)
committerJames Morse <james.morse@arm.com>
Fri, 27 Mar 2026 15:31:38 +0000 (15:31 +0000)
commit2a3c79c61539779a09928893518c8286d7774b54
treedb4818d97031cff82255969be314e6ed8c831a64
parent1458c4f053355f88cc5d190ca02243d2c60fa010
arm_mpam: resctrl: Allow resctrl to allocate monitors

When resctrl wants to read a domain's 'QOS_L3_OCCUP', it needs to allocate
a monitor on the corresponding resource. Monitors are allocated by class
instead of component.

Add helpers to allocate a CSU monitor. These helper return an out of range
value for MBM counters.

Allocating a montitor context is expected to block until hardware resources
become available. This only makes sense for QOS_L3_OCCUP as unallocated MBM
counters are losing data.

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/mpam_internal.h
drivers/resctrl/mpam_resctrl.c
include/linux/arm_mpam.h