Re: [PATCH v5 26/34] arm_mpam: Add mpam_msmon_read() to read monitor value

From: Fenghua Yu

Date: Wed Nov 19 2025 - 00:03:24 EST




On 11/17/25 09:00, Ben Horgan wrote:
From: James Morse <james.morse@xxxxxxx>

Reading a monitor involves configuring what you want to monitor, and
reading the value. Components made up of multiple MSC may need values
from each MSC. MSCs may take time to configure, returning 'not ready'.
The maximum 'not ready' time should have been provided by firmware.

Add mpam_msmon_read() to hide all this. If (one of) the MSC returns
not ready, then wait the full timeout value before trying again.

CC: Shanker Donthineni <sdonthineni@xxxxxxxxxx>
Cc: Shaopeng Tan (Fujitsu) <tan.shaopeng@xxxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>
Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>
Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Tested-by: Peter Newman <peternewman@xxxxxxxxxx>
Tested-by: Carl Worth <carl@xxxxxxxxxxxxxxxxxxxxxx>
Tested-by: Gavin Shan <gshan@xxxxxxxxxx>
Tested-by: Zeng Heng <zengheng4@xxxxxxxxxx>
Signed-off-by: James Morse <james.morse@xxxxxxx>
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>

Reviewed-by: Fenghua Yu <fenghuay@xxxxxxxxxx>

Thanks.

-Fenghua