Re: [RFC PATCH 13/36] arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate
From: James Morse <james.morse@arm.com>
Date: 2025-08-06 18:04:15
Also in:
lkml
Hi Catalin, On 24/07/2025 13:09, Catalin Marinas wrote:
On Fri, Jul 11, 2025 at 06:36:25PM +0000, James Morse wrote:quoted
Probing MPAM is convoluted. MSCs that are integrated with a CPU may only be accessible from those CPUs, and they may not be online. Touching the hardware early is pointless as MPAM can't be used until the system-wide common values for num_partid and num_pmg have been discovered. Start with driver probe/remove and mapping the MSC.
quoted
arch/arm64/Kconfig | 1 + drivers/platform/arm64/Kconfig | 1 + drivers/platform/arm64/Makefile | 1 + drivers/platform/arm64/mpam/Kconfig | 10 + drivers/platform/arm64/mpam/Makefile | 4 + drivers/platform/arm64/mpam/mpam_devices.c | 336 ++++++++++++++++++++ drivers/platform/arm64/mpam/mpam_internal.h | 62 ++++ 7 files changed, 415 insertions(+) create mode 100644 drivers/platform/arm64/mpam/Kconfig create mode 100644 drivers/platform/arm64/mpam/Makefile create mode 100644 drivers/platform/arm64/mpam/mpam_devices.c create mode 100644 drivers/platform/arm64/mpam/mpam_internal.h
Bikeshedding: why not drivers/resctrl to match fs/resctrl? We wouldn't need the previous patch either to move the arm64 platform drivers.
Initially because I don't see any other architecture having an MMIO interface to this stuff, and didn't want a 'top level' driver directory for a single driver. But, re-reading RISC-Vs CBQRI[0] it turns out that theirs is memory mapped...
I'm not an expert on resctrl but the MPAM code looks more like a backend for the resctrl support, so it makes more sense to do as we did for other drivers like irqchip, iommu.
Only because there are many irqchip or iommu. I'm not a fan of drivers/mpam, but drivers/resctrl would suit RISC-V too. (I'll check with Drew) Thanks, James [0] https://patchew.org/linux/20230419111111.477118-1-dfustini@baylibre.com/