[PATCH v5 08/10] arm_mpam: add MPAM-Fb MSC firmware access support
Andre Przywara
andre.przywara at arm.com
Wed Jul 29 08:17:23 PDT 2026
Hi Ben,
thanks for having a look!
On 7/29/26 16:51, Ben Horgan wrote:
> Hi Andre,
>
> On 7/29/26 14:41, Andre Przywara wrote:
>> The Arm MPAM Firmware-backed (Fb) Profile document[1] describes an
>> alternative way of accessing the "Memory System Components" (MSC) in an
>> MPAM enabled system.
>>
>> Normally the MSCs are MMIO mapped, but in some implementations this
>> might not be possible (MSC located outside of the local socket, MSC
>> mapped secure-only) or desirable (direct MMIO access too slow or needs
>> to be mediated through a control processor). MPAM-fb standardises a
>> protocol to abstract MSC accesses, building on the SCMI protocol.
>>
>> Add functions that do an MSC read or write access by redirecting the
>> request through a firmware interface. For now this done via an ACPI
>> PCC shared memory and mailbox combination.
>>
>> Since the protocol used is only a small subset of the full SCMI spec,
>> and the SCMI protocol has no full ACPI support anyway, open-code the
>> (simple) SCMI message generation, for just the fields we need.
>>
>> [1] https://developer.arm.com/documentation/den0144/latest
>>
>> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
>
> [...]
>
>> diff --git a/drivers/resctrl/mpam_internal.h b/drivers/resctrl/mpam_internal.h
>> index 2b81b6b0bf4e..a2193e7df57c 100644
>> --- a/drivers/resctrl/mpam_internal.h
>> +++ b/drivers/resctrl/mpam_internal.h
>> @@ -11,6 +11,7 @@
>> #include <linux/io.h>
>> #include <linux/jump_label.h>
>> #include <linux/llist.h>
>> +#include <linux/mailbox_client.h>
>> #include <linux/mutex.h>
>> #include <linux/resctrl.h>
>> #include <linux/spinlock.h>
>> @@ -57,6 +58,15 @@ struct mpam_garbage {
>> struct platform_device *pdev;
>> };
>>
>> +struct mpam_pcc_chan {
>> + struct list_head pcc_chans;
>> + struct mbox_client pcc_cl;
>> + struct pcc_mbox_chan *pcc_chan;
>> + struct mutex pcc_chan_lock; /* only one message at a time */
>> + struct kref refcount;
>> + int subspace_id;
>> +};
>> +
>> struct mpam_msc {
>> /* member of mpam_all_msc */
>> struct list_head all_msc_list;
>> @@ -66,6 +76,8 @@ struct mpam_msc {
>>
>> /* Not modified after mpam_is_enabled() becomes true */
>> enum mpam_msc_iface iface;
>> + struct mpam_pcc_chan *pcc_chan;
>> + int mpam_fb_msc_id; /* in its own name space */
>
> This gets removed in patch 10 now. I guess you just edited the wrong patch.
Argh, you are right, I squashed the fix into 10/10, but indeed the
member is already introduced here.
Good catch!
Cheers,
Andre
More information about the linux-arm-kernel
mailing list