]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm_mpam: Add helper to reset saved mbwu state
authorJames Morse <james.morse@arm.com>
Wed, 19 Nov 2025 12:23:01 +0000 (12:23 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 19 Nov 2025 18:34:24 +0000 (18:34 +0000)
commit201d96ca4c867695880450930258cd5c97f099d4
tree6b22631cbb4edf83a728ba6717fe6f07bd435ce6
parent9e5afb7c32830bcd123976a7729ef4e2dff0cd77
arm_mpam: Add helper to reset saved mbwu state

resctrl expects to reset the bandwidth counters when the filesystem
is mounted.

To allow this, add a helper that clears the saved mbwu state. Instead
of cross calling to each CPU that can access the component MSC to
write to the counter, set a flag that causes it to be zero'd on the
the next read. This is easily done by forcing a configuration update.

Signed-off-by: James Morse <james.morse@arm.com>
Cc: Peter Newman <peternewman@google.com>
Reviewed-by: Fenghua Yu <fenghuay@nvdia.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Fenghua Yu <fenghuay@nvidia.com>
Tested-by: Carl Worth <carl@os.amperecomputing.com>
Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
drivers/resctrl/mpam_devices.c
drivers/resctrl/mpam_internal.h