arm_mpam: Add basic mpam driver
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest33 patches 132 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/33 | cacheinfo: Expose the code to generate a cache-id from a device_nodedrivers/ include/ | +14 | 3 replies | |
| 1/33 | cacheinfo: Expose the code to generate a cache-id from a device_nodedrivers/ include/ | +14 | 0 replies | |
| 2/33 | drivers: base: cacheinfo: Add helper to find the cache size from cpu+levelinclude/ | +15 | 6 replies | |
| 2/33 | drivers: base: cacheinfo: Add helper to find the cache size from cpu+levelinclude/ | +15 | 0 replies | |
| 3/33 | ACPI / PPTT: Add a helper to fill a cpumask from a processor containerdrivers/ include/ | +89 | 6 replies | |
| 3/33 | ACPI / PPTT: Add a helper to fill a cpumask from a processor containerdrivers/ include/ | +89 | 0 replies | |
| 4/33 | ACPI / PPTT: Stop acpi_count_levels() expecting callers to clear levelsdrivers/ | +11 | 3 replies | |
| 4/33 | ACPI / PPTT: Stop acpi_count_levels() expecting callers to clear levelsdrivers/ | +11 | 2 replies | |
| 5/33 | ACPI / PPTT: Find cache level by cache-iddrivers/ include/ | +81 | 8 replies | |
| 5/33 | ACPI / PPTT: Find cache level by cache-iddrivers/ include/ | +81 | 0 replies | |
| 6/33 | ACPI / PPTT: Add a helper to fill a cpumask from a cache_iddrivers/ include/ | +68 | 4 replies | |
| 6/33 | ACPI / PPTT: Add a helper to fill a cpumask from a cache_iddrivers/ include/ | +68 | 2 replies | |
| 7/33 | arm64: kconfig: Add Kconfig entry for MPAMarch/ | +17 | 6 replies | |
| 7/33 | arm64: kconfig: Add Kconfig entry for MPAMarch/ | +17 | 0 replies | |
| 8/33 | ACPI / MPAM: Parse the MPAM tablearch/ drivers/ drivers/ +3 more | +383 | 6 replies | |
| 8/33 | ACPI / MPAM: Parse the MPAM tablearch/ drivers/ drivers/ +3 more | +383 | 2 replies | |
| 9/33 | dt-bindings: arm: Add MPAM MSC bindingDocumentation/ | +200 | 3 replies | |
| 9/33 | dt-bindings: arm: Add MPAM MSC bindingDocumentation/ | +200 | 0 replies | |
| 10/33 | arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler platearch/ drivers/ drivers/ +4 more | +417 | 16 replies | |
| 10/33 | arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler platearch/ drivers/ drivers/ +4 more | +417 | 2 replies | |
| 11/33 | arm_mpam: Add support for memory controller MSC on DT platformsdrivers/ | +47 | 0 replies | |
| 11/33 | arm_mpam: Add support for memory controller MSC on DT platformsdrivers/ | +47 | 2 replies | |
| 12/33 | arm_mpam: Add the class and component structures for ris firmware describeddrivers/ drivers/ include/ | +574 | 6 replies | |
| 12/33 | arm_mpam: Add the class and component structures for ris firmware describeddrivers/ drivers/ include/ | +574 | 4 replies | |
| 13/33 | arm_mpam: Add MPAM MSC register layout definitionsdrivers/ | +266 | 4 replies | |
| 13/33 | arm_mpam: Add MPAM MSC register layout definitionsdrivers/ | +266 | 0 replies | |
| 14/33 | arm_mpam: Add cpuhp callbacks to probe MSC hardwaredrivers/ drivers/ | +147 | 5 replies | |
| 14/33 | arm_mpam: Add cpuhp callbacks to probe MSC hardwaredrivers/ drivers/ | +147 | 0 replies | |
| 15/33 | arm_mpam: Probe MSCs to find the supported partid/pmg valuesdrivers/ drivers/ include/ | +171 | 5 replies | |
| 15/33 | arm_mpam: Probe MSCs to find the supported partid/pmg valuesdrivers/ drivers/ include/ | +171 | 0 replies | |
| 16/33 | arm_mpam: Add helpers for managing the locking around the mon_sel registersdrivers/ | +56 | 4 replies | |
| 16/33 | arm_mpam: Add helpers for managing the locking around the mon_sel registersdrivers/ | +56 | 0 replies | |
| 17/33 | arm_mpam: Probe the hardware features resctrl supportsdrivers/ drivers/ | +209 | 3 replies | |
| 17/33 | arm_mpam: Probe the hardware features resctrl supportsdrivers/ drivers/ | +209 | 0 replies | |
| 18/33 | arm_mpam: Merge supported features during mpam_enable() into mpam_classdrivers/ drivers/ | +223 | 2 replies | |
| 18/33 | arm_mpam: Merge supported features during mpam_enable() into mpam_classdrivers/ drivers/ | +223 | 0 replies | |
| 19/33 | arm_mpam: Reset MSC controls from cpu hp callbacksdrivers/ drivers/ | +129 | 2 replies | |
| 19/33 | arm_mpam: Reset MSC controls from cpu hp callbacksdrivers/ drivers/ | +129 | 0 replies | |
| 20/33 | arm_mpam: Add a helper to touch an MSC from any CPUdrivers/ | +34 | 2 replies | |
| 20/33 | arm_mpam: Add a helper to touch an MSC from any CPUdrivers/ | +34 | 0 replies | |
| 21/33 | arm_mpam: Extend reset logic to allow devices to be reset any timedrivers/ drivers/ | +61 | 2 replies | |
| 21/33 | arm_mpam: Extend reset logic to allow devices to be reset any timedrivers/ drivers/ | +61 | 0 replies | |
| 22/33 | arm_mpam: Register and enable IRQsdrivers/ drivers/ | +312 | 1 reply | |
| 22/33 | arm_mpam: Register and enable IRQsdrivers/ drivers/ | +312 | 1 reply | |
| 23/33 | arm_mpam: Use a static key to indicate when mpam is enableddrivers/ drivers/ | +16 | 0 replies | |
| 23/33 | arm_mpam: Use a static key to indicate when mpam is enableddrivers/ drivers/ | +16 | 0 replies | |
| 24/33 | arm_mpam: Allow configuration to be applied and restored during cpu onlinedrivers/ drivers/ | +251 | 2 replies | |
| 24/33 | arm_mpam: Allow configuration to be applied and restored during cpu onlinedrivers/ drivers/ | +251 | 0 replies | |
| 25/33 | arm_mpam: Probe and reset the rest of the featuresdrivers/ drivers/ | +189 | 2 replies | |
| 25/33 | arm_mpam: Probe and reset the rest of the featuresdrivers/ drivers/ | +189 | 0 replies | |
| 26/33 | arm_mpam: Add helpers to allocate monitorsdrivers/ drivers/ | +37 | 1 reply | |
| 26/33 | arm_mpam: Add helpers to allocate monitorsdrivers/ drivers/ | +37 | 0 replies | |
| 27/33 | arm_mpam: Add mpam_msmon_read() to read monitor valuedrivers/ drivers/ | +240 | 2 replies | |
| 27/33 | arm_mpam: Add mpam_msmon_read() to read monitor valuedrivers/ drivers/ | +240 | 0 replies | |
| 28/33 | arm_mpam: Track bandwidth counter state for overflow and power managementdrivers/ drivers/ | +200 | 1 reply | |
| 28/33 | arm_mpam: Track bandwidth counter state for overflow and power managementdrivers/ drivers/ | +200 | 2 replies | |
| 29/33 | arm_mpam: Probe for long/lwd mbwu countersdrivers/ drivers/ | +30 | 2 replies | |
| 29/33 | arm_mpam: Probe for long/lwd mbwu countersdrivers/ drivers/ | +30 | 0 replies | |
| 30/33 | arm_mpam: Use long MBWU counters if supporteddrivers/ | +80 | 2 replies | |
| 30/33 | arm_mpam: Use long MBWU counters if supporteddrivers/ | +80 | 0 replies | |
| 31/33 | arm_mpam: Add helper to reset saved mbwu statedrivers/ drivers/ | +51 | 0 replies | |
| 31/33 | arm_mpam: Add helper to reset saved mbwu statedrivers/ drivers/ | +51 | 0 replies | |
| 32/33 | arm_mpam: Add kunit test for bitmap resetdrivers/ drivers/ drivers/ | +85 | 2 replies | |
| 32/33 | arm_mpam: Add kunit test for bitmap resetdrivers/ drivers/ drivers/ | +85 | 0 replies | |
| 33/33 | arm_mpam: Add kunit tests for props_mismatch()drivers/ drivers/ | +329 | 2 replies | |
| 33/33 | arm_mpam: Add kunit tests for props_mismatch()drivers/ drivers/ | +329 | 1 reply |
Reviews trailers per patch
20 of 66 patches have a Reviewed-by or Acked-by.
| Patch | Sudeep Holla | Jonathan Cameron | Rohit Mathew | Ben Horgan | Lorenzo Pieralisi |
|---|---|---|---|---|---|
| 1/33 | |||||
| 1/33 | |||||
| 2/33 | |||||
| 2/33 | |||||
| 3/33 | R-b R-b | ||||
| 3/33 | R-b R-b | ||||
| 4/33 | R-b | ||||
| 4/33 | R-b | ||||
| 5/33 | |||||
| 5/33 | |||||
| 6/33 | R-b R-b | R-b | |||
| 6/33 | R-b R-b | R-b | |||
| 7/33 | R-b R-b | ||||
| 7/33 | R-b R-b | ||||
| 8/33 | |||||
| 8/33 | |||||
| 9/33 | |||||
| 9/33 | |||||
| 10/33 | |||||
| 10/33 | |||||
| 11/33 | |||||
| 11/33 | |||||
| 12/33 | |||||
| 12/33 | |||||
| 13/33 | R-b | ||||
| 13/33 | R-b | ||||
| 14/33 | |||||
| 14/33 | |||||
| 15/33 | |||||
| 15/33 | |||||
| 16/33 | |||||
| 16/33 | |||||
| 17/33 | |||||
| 17/33 | |||||
| 18/33 | R-b | ||||
| 18/33 | R-b | ||||
| 19/33 | |||||
| 19/33 | |||||
| 20/33 | R-b | ||||
| 20/33 | R-b | ||||
| 21/33 | |||||
| 21/33 | |||||
| 22/33 | T-b T-b | ||||
| 22/33 | T-b T-b | ||||
| 23/33 | |||||
| 23/33 | |||||
| 24/33 | |||||
| 24/33 | |||||
| 25/33 | |||||
| 25/33 | |||||
| 26/33 | R-b | ||||
| 26/33 | R-b | ||||
| 27/33 | |||||
| 27/33 | |||||
| 28/33 | |||||
| 28/33 | |||||
| 29/33 | R-b | ||||
| 29/33 | R-b | ||||
| 30/33 | R-b | ||||
| 30/33 | R-b | ||||
| 31/33 | |||||
| 31/33 | |||||
| 32/33 | |||||
| 32/33 | |||||
| 33/33 | |||||
| 33/33 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH 00/33] arm_mpam: Add basic mpam driver
Hello,
This is just enough MPAM driver for the ACPI and DT pre-requisites. It doesn't contain any of the resctrl code, meaning you can't actually drive it from user-space yet. Becuase of that, its hidden behind CONFIG_EXPERT. This will change once the user interface is connected up.
This is the initial group of patches that allows the resctrl code to be built on top. Including that will increase the number of trees that may need to coordinate, so breaking it up make sense.
The locking looks very strange - but is influenced by the 'mpam-fb' firmware interface specification that is still alpha. That thing needs to wait for an interrupt after every system register write, which significantly impacts the driver. Some features just won't work, e.g. reading the monitor registers via perf.
The aim is to not have to make invasive changes to the locking to support the firmware interface, hence it looks strange from day-1.
I've not found a platform that can test all the behaviours around the monitors, so this is where I'd expect the most bugs.
The MPAM spec that describes all the system and MMIO registers can be found here:
https://developer.arm.com/documentation/ddi0598/db/?lang=en
(Ignored the 'RETIRED' warning - that is just arm moving the documentation around.
This document has the best overview)
The expectation is this will go via the arm64 tree.
This series is based on v6.17-rc2, and can be retrieved from:
https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/driver/rv1
The rest of the driver can be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v6.17-rc2
What is MPAM? Set your time-machine to 2020:
https://lore.kernel.org/lkml/[email protected]/
This series was previously posted here:
[RFC] lore.kernel.org/r/[email protected]
Bugs welcome,
Thanks,
James Morse (29):
cacheinfo: Expose the code to generate a cache-id from a device_node
drivers: base: cacheinfo: Add helper to find the cache size from
cpu+level
ACPI / PPTT: Add a helper to fill a cpumask from a processor container ACPI / PPTT: Stop acpi_count_levels() expecting callers to clear
levels
ACPI / PPTT: Find cache level by cache-id
ACPI / PPTT: Add a helper to fill a cpumask from a cache_id
arm64: kconfig: Add Kconfig entry for MPAM
ACPI / MPAM: Parse the MPAM table
arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate
arm_mpam: Add the class and component structures for ris firmware
described
arm_mpam: Add MPAM MSC register layout definitions
arm_mpam: Add cpuhp callbacks to probe MSC hardware
arm_mpam: Probe MSCs to find the supported partid/pmg values
arm_mpam: Add helpers for managing the locking around the mon_sel
registers
arm_mpam: Probe the hardware features resctrl supports
arm_mpam: Merge supported features during mpam_enable() into
mpam_class
arm_mpam: Reset MSC controls from cpu hp callbacks
arm_mpam: Add a helper to touch an MSC from any CPU
arm_mpam: Extend reset logic to allow devices to be reset any time
arm_mpam: Register and enable IRQs
arm_mpam: Use a static key to indicate when mpam is enabled
arm_mpam: Allow configuration to be applied and restored during cpu
online
arm_mpam: Probe and reset the rest of the features
arm_mpam: Add helpers to allocate monitors
arm_mpam: Add mpam_msmon_read() to read monitor value
arm_mpam: Track bandwidth counter state for overflow and power
management
arm_mpam: Add helper to reset saved mbwu state
arm_mpam: Add kunit test for bitmap reset
arm_mpam: Add kunit tests for props_mismatch()
Rob Herring (1):
dt-bindings: arm: Add MPAM MSC binding
Rohit Mathew (2):
arm_mpam: Probe for long/lwd mbwu counters
arm_mpam: Use long MBWU counters if supported
Shanker Donthineni (1):
arm_mpam: Add support for memory controller MSC on DT platforms
.../devicetree/bindings/arm/arm,mpam-msc.yaml | 200 ++ arch/arm64/Kconfig | 19 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/acpi/arm64/Kconfig | 3 + drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/mpam.c | 331 ++ drivers/acpi/pptt.c | 230 +- drivers/acpi/tables.c | 2 +- drivers/base/cacheinfo.c | 19 +- drivers/resctrl/Kconfig | 24 + drivers/resctrl/Makefile | 4 + drivers/resctrl/mpam_devices.c | 2909 +++++++++++++++++ drivers/resctrl/mpam_internal.h | 692 ++++ drivers/resctrl/test_mpam_devices.c | 390 +++ include/linux/acpi.h | 26 + include/linux/arm_mpam.h | 56 + include/linux/cacheinfo.h | 16 + 18 files changed, 4911 insertions(+), 14 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/arm,mpam-msc.yaml create mode 100644 drivers/acpi/arm64/mpam.c create mode 100644 drivers/resctrl/Kconfig create mode 100644 drivers/resctrl/Makefile create mode 100644 drivers/resctrl/mpam_devices.c create mode 100644 drivers/resctrl/mpam_internal.h create mode 100644 drivers/resctrl/test_mpam_devices.c create mode 100644 include/linux/arm_mpam.h
Signature · 1 line
2.20.1