summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2026-10-01 17:34:35 +0200
committerJames Morse <james.morse@arm.com>2026-10-02 18:21:50 +0100
commitca539a37d59a65d05538b24406a9ac49869fd86c (patch)
tree2c540e97a88a39e2bfedae26c0f799a8f67ca10e /include/linux
parentcea32229ec5cd3c080fb7b88cc102c16cfd8a572 (diff)
arm_mpam: prepare mon_sel locking for MPAM-Fb
The MSC MON_SEL register needs to be accessed from hardirq for the overflow interrupt, and when taking an IPI to access these registers on platforms where MSCs are not accesible from every CPU. This makes an irqsave spinlock the obvious lock to protect these registers. On systems with MPAM-Fb mailbox MSC access it must be able to sleep, meaning a mutex must be used. So MPAM-Fb platforms cannot support an overflow interrupt easily. Clearly these two methods can't exist for one MSC at the same time. Change the mon_sel locking wrapper function to only use a spinlock when the MSC is accessed directly via MMIO. In case of MPAM-Fb, we use a mutex, but only if we are in a sleepable context. If that's not the case, we return an error. This should not happen, as MPAM-Fb by design does not require an MSC access to happen from a specific CPU, so there is no need for any IPIs or preemption disabling to satisfy CPU constraints. And since overflow interrupts are not supported at the moment anyway, we also wouldn't meet the other case. Bailing out early is already happening in rare occasions today. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Gavin Shan <gshan@redhat.com> # on NVIDIA Grace Hopper Signed-off-by: James Morse <james.morse@arm.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions