Re: [PATCH v3 07/47] arm64: mpam: Re-initialise MPAM regs when CPU comes online
From: Gavin Shan
Date: Thu Jan 15 2026 - 01:50:37 EST
On 1/13/26 12:58 AM, Ben Horgan wrote:
From: James Morse <james.morse@xxxxxxx>
Now that the MPAM system registers are expected to have values that change,
reprogram them based on the previous value when a CPU is brought online.
Previously MPAM's 'default PARTID' of 0 was always used for MPAM in
kernel-space as this is the PARTID that hardware guarantees to
reset. Because there are a limited number of PARTID, this value is exposed
to user-space, meaning resctrl changes to the resctrl default group would
also affect kernel threads. Instead, use the task's PARTID value for
kernel work on behalf of user-space too. The default of 0 is kept for both
user-space and kernel-space when MPAM is not enabled.
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:
CONFIG_MPAM -> CONFIG_ARM64_MPAM
Check mpam_enabled
Comment about relying on ERET for synchronisation
Update commit message
---
arch/arm64/kernel/cpufeature.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>