Re: [PATCH v4 08/10] arm_mpam: add MPAM-Fb MSC firmware access support
Andre Przywara <[email protected]> Tue, 28 Jul 2026 14:27:01 +0200
| Newsgroups | gmane.linux.acpi.devel,gmane.linux.ports.arm.kernel,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 7/24/26 20:03, Sudeep Holla wrote: > On Fri, Jul 24, 2026 at 06:08:52PM +0100, Ben Horgan wrote: >> Hi Andre, >> >> On 7/23/26 16:54, 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 <[email protected]> >>> --- >>> drivers/resctrl/Makefile | 2 +- >>> drivers/resctrl/mpam_devices.c | 27 ++++- >>> drivers/resctrl/mpam_fb.c | 197 ++++++++++++++++++++++++++++++++ >>> drivers/resctrl/mpam_internal.h | 20 ++++ >>> include/linux/arm_mpam.h | 2 +- >>> 5 files changed, 240 insertions(+), 8 deletions(-) >>> create mode 100644 drivers/resctrl/mpam_fb.c >>> > > [...] [ ... ] >>> + >>> + writel_relaxed(PCC_CHAN_FLAGS_IRQ, &pcc_shmem->flags); >> >> Are you sure it's ok to unconditionally set this irq bit? I know we found out that we do need it set >> sometimes. What does setting it actually based on what the platform does look like? >> > > You need to set it if you are not polling the PCC channels for completions. So I was wondering about that: why does the PCC *user* need to set it here? That's probably more of a protocol issue, but to me it breaks the abstraction: MPAM-Fb just uses the mailbox provided via PCC, and doesn't care about whether it's polling or using an interrupt, because that is a PCC detail. So is there a way to figure this out cleanly? I only found that one could possibly chase down the "struct mbox_chan" controller struct, then look at txdone_method, or something similar, but that sounds very dodgy? Do you have any ideas on this? Cheers, Andre