Linux driver-core infrastructure
 help / color / mirror / Atom feed
* [PATCH RFC 00/15] arm-mpam: Add basic device tree support for resctrl
@ 2026-08-11 13:30 Yin Li
  2026-08-11 13:30 ` [PATCH RFC 01/15] dt-bindings: arm: Add MPAM MSC binding Yin Li
                   ` (15 more replies)
  0 siblings, 16 replies; 18+ messages in thread
From: Yin Li @ 2026-08-11 13:30 UTC (permalink / raw)
  To: Rafael J. Wysocki, Shanker Donthineni, Conor Dooley, Fenghua Yu,
	Krzysztof Kozlowski, Rob Herring, Reinette Chatre, Konrad Dybcio,
	James Morse, Ben Horgan, Bjorn Andersson, Danilo Krummrich,
	Greg Kroah-Hartman
  Cc: linux-arm-msm, ganapatrao.kulkarni, trilok.soni, devicetree,
	driver-core, Srivathsa L Rao, Huang Yiwei, aiqun.yu, linux-kernel

Notes for James, Shanker and Rob
--------------------------------
This series builds directly on your not-yet-upstream MPAM snapshot
patches from the mpam/snapshot+extras/v6.18-rc1 branch. Two things I'd
like your guidance on:

1. Do you mind us picking these up and continuing to extend them? We have
   kept the original authorship and Signed-off-by intact and documented
   the inherited-vs-new split below. If you would prefer a different
   attribution arrangement, or have your own plans to upstream MPAM DT
   support, please let us know so we can avoid duplicating effort.

2. The fixes to the inherited patches are kept as small, self-contained
   patches on top, purely to make review easier. Since fixes to
   not-yet-upstream patches would normally be squashed into the original
   commit by its author, please point out which of these you would like
   folded back, and we will reorganize accordingly.

Rob kindly provided some early off-list feedback on an earlier draft,
which this series has tried to address.

Add Arm MPAM resctrl basic device tree support.

Arm Memory System Resource Partitioning and Monitoring (MPAM) with
resctrl requires device tree (DT) support as a prerequisite before any
higher-level functionality can be enabled. This series provides the
foundational DT binding and parsing support for MPAM, laying the
groundwork for subsequent features such as MPAM Firmware-backed
(MPAM-FB) partitioning.

The patches are based on earlier work by James Morse, Shanker
Donthineni and Rob Herring, with fixes and additions on top:

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]

New on top:
- standalone fixes extracted from the inherited patches (device_node
  refcount, cache-id sentinel/type, RIS index range checks, MSC window
  size, accessibility return type, foundling MSC creation, cache-id
  error path)
- dt-bindings: schema and example fixes
- arm_mpam: derive MSC accessibility from per-RIS nodes as a fallback

[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

DT affinity model
-----------------
An MSC node is nested under the device it partitions or monitors. For a
cache MSC this is the cache node, so the MSC's CPU affinity is derived
from its parent cache; for a memory-controller MSC the parent is the
memory device, which is accessible from all CPUs. A per-RIS fallback is
also provided: when an MSC sits under a generic container with no
affinity-bearing parent, affinity is resolved from an explicit 'cpus'
phandle or an 'arm,mpam-device' phandle on each RIS node.

The Kaanapali DTS patch is for local enabling and verification only and
cannot be upstreamed: the platform is already upstream with a public
device tree, and production firmware does not allow the OS to write the
MSC registers, so this path only works on a local test setup. The MSC
nodes are disabled by default, serving as a reference example for other
platform DT authors.

Signed-off-by: Yin Li <yin.li@oss.qualcomm.com>
---
To: James Morse <james.morse@arm.com>
To: Rob Herring <robh@kernel.org>
To: Shanker Donthineni <sdonthineni@nvidia.com>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Ben Horgan <ben.horgan@arm.com>
To: Conor Dooley <conor+dt@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
To: Danilo Krummrich <dakr@kernel.org>
To: Reinette Chatre <reinette.chatre@intel.com>
To: Fenghua Yu <fenghuay@nvidia.com>
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konradybcio@kernel.org>
Cc: trilok.soni@oss.qualcomm.com
Cc: aiqun.yu@oss.qualcomm.com
Cc: ganapatrao.kulkarni@oss.qualcomm.com
Cc: Srivathsa L Rao <srivathsa.rao@oss.qualcomm.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: driver-core@lists.linux.dev
Cc: devicetree@vger.kernel.org
Cc: trilok.soni@oss.qualcomm.com
Cc: aiqun.yu@oss.qualcomm.com
Cc: ganapatrao.kulkarni@oss.qualcomm.com
Cc: Srivathsa L Rao <srivathsa.rao@oss.qualcomm.com>

---
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 (11):
      arm_mpam: Fix device_node refcount in DT resource parsing
      arm_mpam: Fix cache ID sentinel from ~0UL to U32_MAX to match u32 return type
      arm_mpam: Fix the RIS index range check in mpam_ris_create_locked
      arm_mpam: Fix ris_idx type to prevent range check bypass on truncation
      arm_mpam: Fix MSC MMIO window size to use resource_size() instead of end - start
      arm_mpam: Fix update_msc_accessibility() return type to void
      arm_mpam: Fix mpam_dt_create_foundling_msc() to create MSC platform devices
      arm_mpam: Fix get_cpumask_from_cache() to clear mask on error
      dt-bindings: arm: Fix MPAM MSC binding schema and examples
      arm_mpam: Support MSC accessibility derivation from RIS nodes
      [DNM] arm64: dts: qcom: kaanapali: Add MPAM MSC nodes for the L2 caches

 .../devicetree/bindings/arm/arm,mpam-msc.yaml      | 202 +++++++++++
 arch/arm64/boot/dts/qcom/kaanapali.dtsi            |  50 ++-
 drivers/base/cacheinfo.c                           |  19 +-
 drivers/resctrl/mpam_devices.c                     | 401 +++++++++++++++++++--
 drivers/resctrl/mpam_internal.h                    |   2 +-
 include/linux/arm_mpam.h                           |   4 +-
 include/linux/cacheinfo.h                          |   3 +
 7 files changed, 638 insertions(+), 43 deletions(-)
---
base-commit: 3d08ff75a47a3e7e2ab45a3bcab6723b4d906422
change-id: 20260731-mpam-resctrl-dt-knp-support-c15dcc3a4a98

Best regards,
--  
Yin Li <yin.li@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-08-25 19:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 13:30 [PATCH RFC 00/15] arm-mpam: Add basic device tree support for resctrl Yin Li
2026-08-11 13:30 ` [PATCH RFC 01/15] dt-bindings: arm: Add MPAM MSC binding Yin Li
2026-08-11 13:30 ` [PATCH RFC 02/15] cacheinfo: Expose the code to generate a cache-id from a device_node Yin Li
2026-08-25 19:11   ` Drew Fustini
2026-08-11 13:30 ` [PATCH RFC 03/15] arm_mpam: Add device tree support for MSC probing Yin Li
2026-08-11 13:30 ` [PATCH RFC 04/15] arm_mpam: Add support for memory controller MSC on DT platforms Yin Li
2026-08-11 13:30 ` [PATCH RFC 05/15] arm_mpam: Fix device_node refcount in DT resource parsing Yin Li
2026-08-11 13:30 ` [PATCH RFC 06/15] arm_mpam: Fix cache ID sentinel from ~0UL to U32_MAX to match u32 return type Yin Li
2026-08-11 13:30 ` [PATCH RFC 07/15] arm_mpam: Fix the RIS index range check in mpam_ris_create_locked Yin Li
2026-08-11 13:30 ` [PATCH RFC 08/15] arm_mpam: Fix ris_idx type to prevent range check bypass on truncation Yin Li
2026-08-11 13:30 ` [PATCH RFC 09/15] arm_mpam: Fix MSC MMIO window size to use resource_size() instead of end - start Yin Li
2026-08-11 13:30 ` [PATCH RFC 10/15] arm_mpam: Fix update_msc_accessibility() return type to void Yin Li
2026-08-11 13:30 ` [PATCH RFC 11/15] arm_mpam: Fix mpam_dt_create_foundling_msc() to create MSC platform devices Yin Li
2026-08-11 13:30 ` [PATCH RFC 12/15] arm_mpam: Fix get_cpumask_from_cache() to clear mask on error Yin Li
2026-08-11 13:30 ` [PATCH RFC 13/15] dt-bindings: arm: Fix MPAM MSC binding schema and examples Yin Li
2026-08-11 13:30 ` [PATCH RFC 14/15] arm_mpam: Support MSC accessibility derivation from RIS nodes Yin Li
2026-08-11 13:30 ` [PATCH DNM RFC 15/15] arm64: dts: qcom: kaanapali: Add MPAM MSC nodes for the L2 caches Yin Li
2026-08-25  8:27 ` [PATCH RFC 00/15] arm-mpam: Add basic device tree support for resctrl Yin Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox