Re: [PATCH v7 01/11] arm_mpam: let low level MSC accessors return an error

From: Gavin Shan

Date: Mon Aug 03 2026 - 23:39:10 EST


On 8/1/26 3:03 AM, Andre Przywara wrote:
The upcoming MPAM-Fb support does not use MMIO primitives to access an
MSC, but employs a shared-memory/doorbell based firmware protocol.
Its complexity means that it must be able to handle errors, whereas we
always assume an MMIO based MSC access succeeds today.

Change the __mpam_read_reg() low level accessor function to return the
requested data through a pointer, and return an error code instead.
Also change the __mpam_write_reg() accessor function to return an error
code. At the moment this is always 0, so all error handling paths are
not exercised at the moment. This will change later when alternative
MSC access methods like MPAM-Fb are activated.

Change all direct users of those MSC wrappers to comply with the new
prototypes, though the errors are not propagated all the way up yet.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
Reviewed-by: Ben Horgan <ben.horgan@xxxxxxx>
---
drivers/resctrl/mpam_devices.c | 208 +++++++++++++++++++++------------
1 file changed, 134 insertions(+), 74 deletions(-)

Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>