Skip to content

Commit 67db87d

Browse files
andy-shevvinodkoul
authored andcommitted
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: ee8209f ("dma: acpi-dma: parse CSRT to extract additional resources") Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent d803c8b commit 67db87d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/dma/acpi-dma.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,14 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp,
7070

7171
si = (const struct acpi_csrt_shared_info *)&grp[1];
7272

73-
/* Match device by MMIO and IRQ */
73+
/* Match device by MMIO */
7474
if (si->mmio_base_low != lower_32_bits(mem) ||
75-
si->mmio_base_high != upper_32_bits(mem) ||
76-
si->gsi_interrupt != irq)
75+
si->mmio_base_high != upper_32_bits(mem))
76+
return 0;
77+
78+
/* Match device by Linux vIRQ */
79+
ret = acpi_register_gsi(NULL, si->gsi_interrupt, si->interrupt_mode, si->interrupt_polarity);
80+
if (ret != irq)
7781
return 0;
7882

7983
dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n",

0 commit comments

Comments
 (0)