Thread (200 messages) 200 messages, 10 authors, 2025-09-10

Re: [PATCH 08/33] ACPI / MPAM: Parse the MPAM table

From: James Morse <james.morse@arm.com>
Date: 2025-09-10 19:31:18
Also in: linux-acpi, linux-devicetree, lkml

Hi Shaopeng,

On 09/09/2025 07:54, Shaopeng Tan (Fujitsu) wrote:
quoted
Add code to parse the arm64 specific MPAM table, looking up the cache level
from the PPTT and feeding the end result into the MPAM driver.
quoted
diff --git a/drivers/acpi/arm64/mpam.c b/drivers/acpi/arm64/mpam.c new
file mode 100644 index 000000000000..e55fc2729ac5
--- /dev/null
+++ b/drivers/acpi/arm64/mpam.c
@@ -0,0 +1,331 @@
quoted
+static int __init acpi_mpam_parse(void) {
+        struct acpi_table_header *table __free(acpi_table) =
acpi_get_table_ret(ACPI_SIG_MPAM, 0);
+	char *table_end, *table_offset = (char *)(table + 1);
+	struct property_entry props[4]; /* needs a sentinel */
+	struct acpi_mpam_msc_node *tbl_msc;
+	int next_res, next_prop, err = 0;
+	struct acpi_device *companion;
+	struct platform_device *pdev;
+	enum mpam_msc_iface iface;
+	struct resource res[3];
+	char uid[16];
+	u32 acpi_id;
+
+	if (acpi_disabled || !system_supports_mpam() || IS_ERR(table))
+		return 0;
+
+	if (IS_ERR(table))
+		return 0;
This is redundant, it's the same as the previous line.
Fixed, thanks.

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