Thread (147 messages) 147 messages, 9 authors, 2025-11-19

Re: [PATCH 11/33] arm_mpam: Add the class and component structures for firmware described ris

From: Ben Horgan <ben.horgan@arm.com>
Date: 2025-11-12 17:21:13
Also in: linux-acpi, lkml

Hi Jonathan,

On 11/10/25 17:10, Jonathan Cameron wrote:
On Fri,  7 Nov 2025 12:34:28 +0000
Ben Horgan [off-list ref] wrote:
quoted
From: James Morse <james.morse@arm.com>

An MSC is a container of resources, each identified by their RIS index.
Some RIS are described by firmware to provide their position in the system.
Others are discovered when the driver probes the hardware.

To configure a resource it needs to be found by its class, e.g. 'L2'.
There are two kinds of grouping, a class is a set of components, which
are visible to user-space as there are likely to be multiple instances
of the L2 cache. (e.g. one per cluster or package)

Add support for creating and destroying structures to allow a hierarchy
of resources to be created.

CC: Ben Horgan <ben.horgan@arm.com>
Hi Ben,

Remember to clear out CC'ing yourself.
quoted
Tested-by: Fenghua Yu <fenghuay@nvidia.com>
Tested-by: Shaopeng Tan <redacted>
Tested-by: Peter Newman <redacted>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
---
Changes since v3:
Jonathan:
Code reordering.
I'm guessing I may have sent things in a slightly less than ideal directly.

Why can't we have ordering as follows (with no forwards declarations)

mpam_class_alloc()
mpam_class_destroy()
//maybe other mpam_class stuff here
mpam_component_alloc()
mpam_component_destroy() - needs mpam_class_destroy()
//maybe other mpam_component stuff here
mpam_vmsc_alloc()
mpam_vmsc_destroy() - needs mpam_component_destroy()
//other mpam_vmsc here
This works and then I need to add mpam_ris_get_affinity() as
mpam_ris_create_locked() depends on it.

I also add the helper functions it depends on
mpam_get_cpumask_from_cache_id() and get_cpumask_from_node_id().
mpam_ris_create_locked() - needs all the destroys.
mpam_ris_destroy() - needs mpam vmsc_destroy()
I may well have missed a more complex dependency chain.

Other than that, LGTM. Given any change in ordering can be trivially verified
by building it and Gavin's comments seem simple to resolve.

Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Thanks,

Ben

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help