Thread (117 messages) 117 messages, 10 authors, 2025-08-15

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:03:55
Also in: lkml

Hi Ben,

On 24/07/2025 12:02, Ben Horgan wrote:
On 11/07/2025 19:36, 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
diff --git a/drivers/platform/arm64/mpam/mpam_devices.c b/drivers/platform/arm64/mpam/
mpam_devices.c
new file mode 100644
index 000000000000..5b886ba54ba8
--- /dev/null
+++ b/drivers/platform/arm64/mpam/mpam_devices.c
@@ -0,0 +1,336 @@
quoted
+static int mpam_dt_count_msc(void)
+{
+    int count = 0;
+    struct device_node *np;
+
+    for_each_compatible_node(np, NULL, "arm,mpam-msc")
This will count even 'status = "disabled"' nodes. Add a check for that.

if (of_device_is_available(np))> +        count++;
Good spot, fixed - thanks.


Thanks,

James

quoted
+
+    return count;
+}
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help