]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm_mpam: Reset when feature configuration bit unset
authorBen Horgan <ben.horgan@arm.com>
Fri, 13 Mar 2026 14:45:39 +0000 (14:45 +0000)
committerJames Morse <james.morse@arm.com>
Fri, 27 Mar 2026 15:26:52 +0000 (15:26 +0000)
commita1cb6577f575ba5ec2583caf4f791a86754dbf69
treeedb696631fb614508bced1bbc7eccb191a8cbc85
parentf91e913355f49c878fc77f995fd71b7800352bd2
arm_mpam: Reset when feature configuration bit unset

To indicate that the configuration, of the controls used by resctrl, in a
RIS need resetting to driver defaults the reset flags in mpam_config are
set. However, these flags are only ever set temporarily at RIS scope in
mpam_reset_ris() and hence mpam_cpu_online() will never reset these
controls to default. As the hardware reset is unknown this leads to unknown
configuration when the control values haven't been configured away from the
defaults.

Use the policy that an unset feature configuration bit means reset. In this
way the mpam_config in the component can encode that it should be in reset
state and mpam_reprogram_msc() will reset controls as needed.

Fixes: 09b89d2a72f3 ("arm_mpam: Allow configuration to be applied and restored during cpu online")
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: James Morse <james.morse@arm.com>
Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
[ morse: Removed unused reset flags from config structure ]
Signed-off-by: James Morse <james.morse@arm.com>
drivers/resctrl/mpam_devices.c
drivers/resctrl/mpam_internal.h