[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6a77726d-1881-4590-8021-623c877bb5d7@arm.com>
Date: Wed, 6 Aug 2025 19:04:09 +0100
From: James Morse <james.morse@....com>
To: Catalin Marinas <catalin.marinas@....com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Rob Herring <robh@...nel.org>, Ben Horgan <ben.horgan@....com>,
Rohit Mathew <rohit.mathew@....com>,
Shanker Donthineni <sdonthineni@...dia.com>, Zeng Heng
<zengheng4@...wei.com>, Lecopzer Chen <lecopzerc@...dia.com>,
Carl Worth <carl@...amperecomputing.com>,
shameerali.kolothum.thodi@...wei.com,
D Scott Phillips OS <scott@...amperecomputing.com>, lcherian@...vell.com,
bobo.shaobowang@...wei.com, tan.shaopeng@...itsu.com,
baolin.wang@...ux.alibaba.com, Jamie Iles <quic_jiles@...cinc.com>,
Xin Hao <xhao@...ux.alibaba.com>, peternewman@...gle.com,
dfustini@...libre.com, amitsinght@...vell.com,
David Hildenbrand <david@...hat.com>, Rex Nie <rex.nie@...uarmicro.com>,
Dave Martin <dave.martin@....com>, Koba Ko <kobak@...dia.com>
Subject: Re: [RFC PATCH 13/36] arm_mpam: Add probe/remove for mpam msc driver
and kbuild boiler plate
Hi Catalin,
On 24/07/2025 13:09, Catalin Marinas wrote:
> On Fri, Jul 11, 2025 at 06:36:25PM +0000, James Morse wrote:
>> 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.
>> 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/
Powered by blists - more mailing lists