dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
PATCH 1/1 dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
Currently the CRST parsing relies on the fact that on most of x86 devices the IRQ mapping is 1:1 with Linux vIRQ. However, it may be not true for some. Fix this by converting GSI to Linux vIRQ before checking it.
Fixes ee8209fd026b ("dma: acpi-dma: parse CSRT to extract additional resources")
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/dma/acpi-dma.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/dma/acpi-dma.c +7 -3
@@ -70,10 +70,14 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp, si = (const struct acpi_csrt_shared_info *)&grp[1 ]; -/* Match device by MMIO and IRQ */ +/* Match device by MMIO */ if (si->mmio_base_low !=lower_32_bits (mem) || - si->mmio_base_high !=upper_32_bits (mem) || - si->gsi_interrupt != irq) + si->mmio_base_high !=upper_32_bits (mem)) +return 0 ; + +/* Match device by Linux vIRQ */ + ret =acpi_register_gsi (NULL , si->gsi_interrupt, si->interrupt_mode, si->interrupt_polarity); +if (ret != irq)return 0 ; dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n",
Signature · 1 line
2.30.2
Quoted 3 lines · Andy Shevchenko
Currently the CRST parsing relies on the fact that on most of x86 devices the IRQ mapping is 1:1 with Linux vIRQ. However, it may be not true for some. Fix this by converting GSI to Linux vIRQ before checking it.
Applied, thanks
Signature · 1 line
~Vinod