Re: [RFC PATCH 02/38] arm64: mpam: Re-initialise MPAM regs when CPU comes online

Ben Horgan
2025-12-11T11:32:52Z

Retraction... sorry

On 12/11/25 11:23, Ben Horgan wrote:
> Hi James,
>
> On 12/9/25 15:13, Ben Horgan wrote:
>> Hi James,
>>
>> On 12/5/25 21:58, James Morse wrote:

>
> Actually, this code is only run before the mpam enablement is finished,
> importantly before the mpam_enabled static key is set, and so
> arm64_mpam_current is still 0 for every cpu. For cpus that are brought
> up after boot time this is never run.

Actually, actually, this is run whenever a cpu comes online, even if by
hotplug later, and so arm64_mpam_current will be 0 as need on the first
switch on and the previous value for the cpu when it has previously been
off.

>
> As SYS_MPAM0_EL1 and SYS_MPAM1_EL1 are unknown out of reset we should
> set them to 0 whenever a cpu comes online to make sure they initially
> use PARTID 0 as that is the only one guaranteed to have sensible
> defaults in the MSC. Once the mpam driver has configured the MSC we can
> start setting other values.
>
>>
>>> +
>>> + write_sysreg_s(regval, SYS_MPAM1_EL1);
>>> + isb();
>>> +
>>> + write_sysreg_s(regval, SYS_MPAM0_EL1);
>>> }
>>>
>>> static bool
>>
>> Thanks,
>>
>> Ben
>>
>>
>
> Thanks,
>
> Ben
>
>

--
Thanks,

Ben