[PATCH 08/33] ACPI / MPAM: Parse the MPAM table
James Morse
james.morse at arm.com
Wed Sep 10 12:31:10 PDT 2025
Hi Shaopeng,
On 09/09/2025 07:54, Shaopeng Tan (Fujitsu) wrote:
>> 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.
>> 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 @@
>> +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
More information about the linux-arm-kernel
mailing list