aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-11-17 06:34:26 -0500
committerVinod Koul <vinod.koul@intel.com>2015-12-05 03:30:34 -0500
commitf94cf9f4c54a72ccbd2078bb0cedd3691a71c431 (patch)
tree4b85741e2370969116ae7b6ac714e9c2297298a8
parent95da0c19d164f6df0b71a5187950f47d4b746e91 (diff)
dmaengine: acpi-dma: check for 64-bit MMIO address
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>
-rw-r--r--drivers/dma/acpi-dma.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dma/acpi-dma.c b/drivers/dma/acpi-dma.c
index 16d0daa058a5..eed6bda01790 100644
--- a/drivers/dma/acpi-dma.c
+++ b/drivers/dma/acpi-dma.c
@@ -15,6 +15,7 @@
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/kernel.h>
18#include <linux/list.h> 19#include <linux/list.h>
19#include <linux/mutex.h> 20#include <linux/mutex.h>
20#include <linux/slab.h> 21#include <linux/slab.h>
@@ -72,7 +73,9 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp,
72 si = (const struct acpi_csrt_shared_info *)&grp[1]; 73 si = (const struct acpi_csrt_shared_info *)&grp[1];
73 74
74 /* Match device by MMIO and IRQ */ 75 /* Match device by MMIO and IRQ */
75 if (si->mmio_base_low != mem || si->gsi_interrupt != irq) 76 if (si->mmio_base_low != lower_32_bits(mem) ||
77 si->mmio_base_high != upper_32_bits(mem) ||
78 si->gsi_interrupt != irq)
76 return 0; 79 return 0;
77 80
78 dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n", 81 dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n",