[RFC PATCH v2 0/2] arm_mpam: Save and restore the MSC state across system sleep

From: Jinjie Ruan

Date: Thu Nov 26 2026 - 07:56:21 EST


The arm_mpam driver only saves and restores an MSC's state from its
CPU hotplug callbacks, which never run for the MSCs reachable from
the CPU that suspends the system, so the configuration and bandwidth
counters are lost across suspend-to-RAM and hibernation.

Add system sleep callbacks that save and restore the state while the
MSC is still accessible, and stop the unfrozen resctrl workers from
touching a suspended MSC.

The first patch rework the CPU hotplug path, and the second one fix
this problem.

Changes in RFC v2:
- Also mention hibernate (Ben).
- Extract the mpam_msc_power_on/off() helpers first to make it
more cleaer.
- Fix AI review issue [1].
- Add fix tag.
- RFC v1: https://lore.kernel.org/all/20261124082708.1705024-1-ruanjinjie@xxxxxxxxxx/

[1]: https://sashiko.dev/#/patchset/20261124082708.1705024-1-ruanjinjie%40huawei.com

Jinjie Ruan (2):
arm_mpam: Factor out the MSC power on and off helpers
arm_mpam: Save and restore the MSC state across system sleep

drivers/resctrl/mpam_devices.c | 130 +++++++++++++++++++++++++-------
drivers/resctrl/mpam_internal.h | 7 ++
2 files changed, 111 insertions(+), 26 deletions(-)

--
2.34.1