From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: 2021-08-02 17:55:15
While IRQ test agaist the returned variable in practice is a good enough
there is still a room for theoretical mistake in case the vIRQ of the
device contains the same error code that acpi_register_gsi() may return.
Due to this, check for error code separately from matching the vIRQs.
Besides that, append documentation to tell why acpi_gsi_to_irq() can't
be used and we call acpi_register_gsi() instead.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/dma/acpi-dma.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
@@ -75,8 +75,16 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp,si->mmio_base_high!=upper_32_bits(mem))return0;-/* Match device by Linux vIRQ */+/*+*acpi_gsi_to_irq()can'tbeusedbecausesomeplatformsdonotsave+*registeredIRQsintheMPtable.Insteadwejusttrytoregister+*theGSI,whichisthecorepartoftheabovementionedfunction.+*/ret=acpi_register_gsi(NULL,si->gsi_interrupt,si->interrupt_mode,si->interrupt_polarity);+if(ret<0)+return0;++/* Match device by Linux vIRQ */if(ret!=irq)return0;
While IRQ test agaist the returned variable in practice is a good enough
there is still a room for theoretical mistake in case the vIRQ of the
device contains the same error code that acpi_register_gsi() may return.
Due to this, check for error code separately from matching the vIRQs.
Besides that, append documentation to tell why acpi_gsi_to_irq() can't
be used and we call acpi_register_gsi() instead.
@@ -75,8 +75,16 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp,si->mmio_base_high!=upper_32_bits(mem))return0;-/* Match device by Linux vIRQ */+/*+*acpi_gsi_to_irq()can'tbeusedbecausesomeplatformsdonotsave+*registeredIRQsintheMPtable.Insteadwejusttrytoregister+*theGSI,whichisthecorepartoftheabovementionedfunction.+*/ret=acpi_register_gsi(NULL,si->gsi_interrupt,si->interrupt_mode,si->interrupt_polarity);+if(ret<0)+return0;++/* Match device by Linux vIRQ */if(ret!=irq)return0;
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: 2021-08-06 15:29:34
On Fri, Aug 06, 2021 at 07:14:50PM +0530, Vinod Koul wrote:
On 02-08-21, 20:55, Andy Shevchenko wrote:
quoted
While IRQ test agaist the returned variable in practice is a good enough
there is still a room for theoretical mistake in case the vIRQ of the
device contains the same error code that acpi_register_gsi() may return.
Due to this, check for error code separately from matching the vIRQs.
Besides that, append documentation to tell why acpi_gsi_to_irq() can't
be used and we call acpi_register_gsi() instead.
On Fri, Aug 06, 2021 at 07:14:50PM +0530, Vinod Koul wrote:
quoted
On 02-08-21, 20:55, Andy Shevchenko wrote:
quoted
While IRQ test agaist the returned variable in practice is a good enough
there is still a room for theoretical mistake in case the vIRQ of the
device contains the same error code that acpi_register_gsi() may return.
Due to this, check for error code separately from matching the vIRQs.
Besides that, append documentation to tell why acpi_gsi_to_irq() can't
be used and we call acpi_register_gsi() instead.
patch fails to apply, pls rebase
I don't see that you applied the previous patch [1].
Care to apply it, please?
Sorry, somehow that one was pushed to queue but never got applied!
Have applied both now