acpi_table: Fix IORT RC node
authorPatrick Rudolph <patrick.rudolph@9elements.com>
Sun, 16 Mar 2025 08:32:52 +0000 (09:32 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 3 Apr 2025 17:38:14 +0000 (11:38 -0600)
commit92d448f4f1ed80dfaa2327eeea9a741717dc3847
treeaefff260f9243dc04758b0e9b5a39569ed13f1db
parent885fd621a309a2c3f8e8d41bdc8ff893221dc478
acpi_table: Fix IORT RC node

Even though the RC node has the correct size and the ID mappings
are written to the end of the node, the ID 'mapping offset' and
'mapping count' are not written in the IORT RC node header, thus it
looks like that the RC node has no ID mappings.
The Linux kernel doesn't complain about the invalid IORT RC node,
even though the spec says that each RC node must have an ID mapping.
The kernel will fail to use MSI IRQs and fall back to a legacy IRQ
mechanism that's not working either.
Finally it will show strange behaviour around PCI interrupts, making it
hard to trace back to an invalid IORT RC nodes.

Add the missing ID mapping count and mapping offset.

TEST: Fixes IRQ usage of PCI devices on qemu/sbsa-ref.
Fixes: bf5d37662da5 "acpi: acpi_table: Add IORT support"

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
lib/acpi/acpi_table.c