Re: [PATCH v1 10/11] arm_mpam: Don't loop forever if there is the maximum possible amount of PARTIDs

From: Gavin Shan

Date: Thu Jul 16 2026 - 00:52:28 EST


On 7/10/26 9:55 PM, Ben Horgan wrote:
On a theoretical platform with the maximum possible number of usable
PARTIDs, 0XFFFF, the loops iterating over PARTID in mpam_reset_ris() and
mpam_reprogram_ris() will never reach their termination condition leading
to a system hang when register the cpu hotplug handlers when MPAM is
enabling.

Fix these loops.

Fixes: f188a36ca241 ("arm_mpam: Reset MSC controls from cpuhp callbacks")
Fixes: 09b89d2a72f3 ("arm_mpam: Allow configuration to be applied and restored during cpu online")
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
drivers/resctrl/mpam_devices.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>