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

Gavin Shan <[email protected]> Tue, 4 Aug 2026 13:38:30 +1000
Newsgroups gmane.linux.acpi.devel,gmane.linux.ports.arm.kernel,gmane.linux.kernel
Message-ID <[email protected]>
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 <[email protected]>
> Reviewed-by: Jonathan Cameron <[email protected]>
> Reviewed-by: Ben Horgan <[email protected]>
> ---
>   drivers/resctrl/mpam_devices.c | 208 +++++++++++++++++++++------------
>   1 file changed, 134 insertions(+), 74 deletions(-)
> 
Reviewed-by: Gavin Shan <[email protected]>