Re: [PATCH v6 18/40] arm_mpam: resctrl: Implement helpers to update configuration
From: Gavin Shan
Date: Mon Mar 23 2026 - 02:52:39 EST
On 3/14/26 12:45 AM, Ben Horgan wrote:
From: James Morse <james.morse@xxxxxxx>Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>
resctrl has two helpers for updating the configuration.
resctrl_arch_update_one() updates a single value, and is used by the
software-controller to apply feedback to the bandwidth controls, it has to
be called on one of the CPUs in the resctrl:domain.
resctrl_arch_update_domains() copies multiple staged configurations, it can
be called from anywhere.
Both helpers should update any changes to the underlying hardware.
Implement resctrl_arch_update_domains() to use
resctrl_arch_update_one(). Neither need to be called on a specific CPU as
the mpam driver will send IPIs as needed.
Tested-by: Gavin Shan <gshan@xxxxxxxxxx>
Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Tested-by: Peter Newman <peternewman@xxxxxxxxxx>
Tested-by: Zeng Heng <zengheng4@xxxxxxxxxx>
Tested-by: Punit Agrawal <punit.agrawal@xxxxxxxxxxxxxxxx>
Reviewed-by: Zeng Heng <zengheng4@xxxxxxxxxx>
Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>
Signed-off-by: James Morse <james.morse@xxxxxxx>
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
Changes since rfc:
list_for_each_entry -> list_for_each_entry_rcu
return 0
Restrict scope of local variables
Changes since v2:
whitespace fix
---
drivers/resctrl/mpam_resctrl.c | 70 ++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)