]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dmaengine: acpi-dma: check for 64-bit MMIO address
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 17 Nov 2015 11:34:26 +0000 (13:34 +0200)
committerVinod Koul <vinod.koul@intel.com>
Sat, 5 Dec 2015 08:30:34 +0000 (14:00 +0530)
Currently the match DMA controller is done only for lower 32 bits of
address which might be not true on 64-bit platform. Check upper portion
as well.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/acpi-dma.c

index 16d0daa058a54ed6db7114f71aedf2714f036d5d..eed6bda01790f789116bf402bd6b14c36b641ff5 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/module.h>
+#include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/mutex.h>
 #include <linux/slab.h>
@@ -72,7 +73,9 @@ 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 */
-       if (si->mmio_base_low != mem || si->gsi_interrupt != irq)
+       if (si->mmio_base_low != lower_32_bits(mem) ||
+           si->mmio_base_high != upper_32_bits(mem) ||
+           si->gsi_interrupt != irq)
                return 0;
 
        dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n",