]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm_mpam: Pretend that NRDY is always hardware managed
authorBen Horgan <ben.horgan@arm.com>
Thu, 7 May 2026 15:28:13 +0000 (16:28 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 14 May 2026 08:51:50 +0000 (09:51 +0100)
commit4387970bbd84fd14e0c49c3089c5061ccd86b98a
treee40b7a8172b908265957cf559c555fbe865ef371
parent1ef2a89584b7b788b2603590d886db076b2f24cc
arm_mpam: Pretend that NRDY is always hardware managed

Rule ZTXDS of the MPAM specification, IHI009 version B.b, states: "If a
monitor does not support automatic updates of NRDY, software can use that
bit for any purpose."

As software is not reliably informed whether or not the monitor supports
automatic updates of NRDY always assume that hardware may manage NRDY but
don't rely on it. When NRDY is truly untouched by hardware then, as it is
written to 0 on configuration, it will always read 0.

At probe it's checked if MSMON_CSU.NRDY and MSMON_MBWU.NRDY are hardware
managed but not MSMON_MBWU_L.NDRY. Specialize the checking for hardware
managed NRDY to CSU counters as this is the only case where hardware
management makes sense. Continue to inform the user if MSMON_CSU.NRDY
appears to be hardware managed but the firmware doesn't provide the
associated time limit for the automatic clearing of NRDY. Remove the NRDY
feature flags as they are now unused.

Fixes: 8c90dc68a5de ("arm_mpam: Probe the hardware features resctrl supports")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
drivers/resctrl/mpam_devices.c
drivers/resctrl/mpam_internal.h