[PATCH v5 0/7] arm-mpam: Add basic device tree support for resctrl
From: Yin Li
Date: Mon Nov 09 2026 - 05:09:25 EST
Arm Memory System Resource Partitioning and Monitoring (MPAM) with
resctrl requires device tree (DT) support before it can be enabled on
DT-based platforms. This series provides the foundational DT binding and
parsing support for MPAM.
The verification platform has been updated from Kaanapali to Nord.
The patches are based on earlier work by James Morse, Shanker Donthineni
and Rob Herring, with fixes and additions on top.
Standalone fixes to existing mainline code (placed first, independent
of the DT work):
- arm_mpam: fix the RIS index range check
- arm_mpam: fix the MSC MMIO window size (off-by-one)
Inherited (authorship preserved, with fixes noted in each patch):
- dt-bindings: MPAM MSC binding [1]
- cacheinfo: expose cache-id generation from a device_node [2]
- arm_mpam: device tree support for MSC probing [3]
- arm_mpam: memory controller MSC support on DT platforms [4]
[1] https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?h=mpam/snapshot+extras/v6.18-rc1&id=b38bed339681
[2] https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?h=mpam/snapshot+extras/v6.18-rc1&id=2af39084438c
[3] https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?h=mpam/snapshot+extras/v6.18-rc1&id=a6ab8b6c77cb
[4] https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?h=mpam/snapshot+extras/v6.18-rc1&id=c1be40782ace
The verification platform has been updated from Kaanapali to Nord. The
Nord DTS patch adds MSC nodes for the L2 caches as a local verification
example. The MSC register size is 0x2000, as the Nord platform implements
MPAM registers up to offset 0x1FFF (permitted when MPAMCFG_MBW_PBM is
not implemented).
Signed-off-by: Yin Li <yin.li@xxxxxxxxxxxxxxxx>
---
Changes in v5:
- Restore memory controller MSC support: a concrete platform user
(DDR egress MSC) has been confirmed and verified on hardware.
- Update binding: restore 'arm,mpam-memory-controller-msc' compatible
and add a top-level memory controller MSC example.
- Switch platform DTS from Kaanapali to Nord.
- Rebase onto next-20261014.
- Link to v4: https://patch.msgid.link/20261028-mpam-resctrl-dt-knp-support-v4-0-bdda1e445cba@xxxxxxxxxxxxxxxx
Changes in v4:
- Reduce binding to minimal set covering only properties in current
use: remove RIS child node support, memory controller support,
arm,mpam-device, cpus and interrupt-names.
- Drop memory controller MSC patch (no concrete platform user).
- Drop RIS accessibility patch (no concrete platform user).
- Update DNM Kaanapali DTS: fix node names, compatible, ranges/reg
format; use 0x2000 register size reflecting platform implementation.
- Rebase onto next-20261014.
- Link to v3: https://patch.msgid.link/20261008-mpam-resctrl-dt-knp-support-v3-0-35196c2b43bf@xxxxxxxxxxxxxxxx
Changes since RFC v2:
- Fold the binding schema/example fixes into the binding patch.
- Fold the foundling MSC fix into the DT support patch; remove the
unnecessary parent cache availability check from
mpam_dt_create_foundling_msc() to keep it consistent with
mpam_dt_count_msc().
- Remove the #ifdef CONFIG_OF guard around the cache_of_calculate_id()
prototype in cacheinfo.h.
- Remove the [Yin Li:] annotation from the cacheinfo patch.
- Rebase onto next-20260918.
Changes since RFC v1:
- Fold fixes to inherited patches into their respective patches with
[Yin Li: ...] annotations, as requested by Ben and Andre.
- Move the RIS index range-check and MSC MMIO window size fixes to the
front as standalone fixes with Fixes: tags.
- MSC MMIO window size: genuine off-by-one fix; the ">" bounds checks
include the access width and are kept as-is.
- ris_idx: validate range after of_property_read_reg() and keep u8
downstream, instead of widening the call chain to u64.
- cache-id sentinel: keep ~0U notation, leave cacheinfo.c unchanged,
replace unsigned long with u32.
- Convert mpam_get_cpumask_from_cache_id() and the cache/component-id
variables from unsigned long to u32.
- Fold the device_node refcount fix (of_node_get()), reviewed by Andre
Przywara in RFC v1, into the DT support and memory-controller MSC
patches.
- Drop the "clear mask on error" patch.
Previous versions:
v4: https://lore.kernel.org/all/20261028-mpam-resctrl-dt-knp-support-v4-0-bdda1e445cba@xxxxxxxxxxxxxxxx/
v3: https://lore.kernel.org/all/20261008-mpam-resctrl-dt-knp-support-v3-0-35196c2b43bf@xxxxxxxxxxxxxxxx/
RFC v2: https://lore.kernel.org/all/20260914-mpam-resctrl-dt-knp-support-v2-0-bf6645bb2f65@xxxxxxxxxxxxxxxx/
RFC v1: https://lore.kernel.org/all/20260811-mpam-resctrl-dt-knp-support-v1-0-ea6397bead59@xxxxxxxxxxxxxxxx/
To: James Morse <james.morse@xxxxxxx>
To: Rob Herring <robh@xxxxxxxxxx>
To: Shanker Donthineni <sdonthineni@xxxxxxxxxx>
To: Ben Horgan <ben.horgan@xxxxxxx>
To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
To: Conor Dooley <conor+dt@xxxxxxxxxx>
To: Catalin Marinas <catalin.marinas@xxxxxxx>
To: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
To: Danilo Krummrich <dakr@xxxxxxxxxx>
To: Reinette Chatre <reinette.chatre@xxxxxxxxx>
To: Fenghua Yu <fenghuay@xxxxxxxxxx>
To: Jonathan Cameron <jic23@xxxxxxxxxx>
To: Bjorn Andersson <andersson@xxxxxxxxxx>
To: Konrad Dybcio <konradybcio@xxxxxxxxxx>
To: Gavin Shan <gshan@xxxxxxxxxx>
Cc: Andre Przywara <andre.przywara@xxxxxxx>
Cc: Drew Fustini <fustini@xxxxxxxxxx>
Cc: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Cc: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Cc: trilok.soni@xxxxxxxxxxxxxxxx
Cc: aiqun.yu@xxxxxxxxxxxxxxxx
Cc: ganapatrao.kulkarni@xxxxxxxxxxxxxxxx
Cc: Srivathsa L Rao <srivathsa.rao@xxxxxxxxxxxxxxxx>
Cc: Huang Yiwei <huang.yiwei@xxxxxxxxxxxxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-arm-msm@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: driver-core@xxxxxxxxxxxxxxx
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: Ping Li <leeonion.muyu@xxxxxxxxx>
---
James Morse (2):
cacheinfo: Expose the code to generate a cache-id from a device_node
arm_mpam: Add device tree support for MSC probing
Rob Herring (1):
dt-bindings: arm: Add MPAM MSC binding
Shanker Donthineni (1):
arm_mpam: Add support for memory controller MSC on DT platforms
Yin Li (3):
arm_mpam: Fix the RIS index range check in mpam_ris_create_locked
arm_mpam: Fix MSC MMIO window size off-by-one with resource_size()
arm64: dts: qcom: nord: Add MPAM MSC nodes for the L2 caches
.../devicetree/bindings/arm/arm,mpam-msc.yaml | 62 +++++
arch/arm64/boot/dts/qcom/nord.dtsi | 72 ++++--
drivers/base/cacheinfo.c | 17 +-
drivers/resctrl/mpam_devices.c | 278 +++++++++++++++++++--
drivers/resctrl/mpam_internal.h | 2 +-
include/linux/cacheinfo.h | 1 +
6 files changed, 389 insertions(+), 43 deletions(-)
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
change-id: 20260731-mpam-resctrl-dt-knp-support-c15dcc3a4a98
Best regards,
--
Yin Li <yin.li@xxxxxxxxxxxxxxxx>