iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG
authorCQ Tang <cq.tang@intel.com>
Wed, 13 Jan 2016 21:15:03 +0000 (21:15 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 13 Jan 2016 23:30:49 +0000 (23:30 +0000)
This is a 32-bit register. Apparently harmless on real hardware, but
causing justified warnings in simulation.

Signed-off-by: CQ Tang <cq.tang@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@vger.kernel.org
drivers/iommu/dmar.c
drivers/iommu/intel_irq_remapping.c

index 80e3c176008e511ec75c1771758b63de8ad39d9d..55a19e49205bcab9ad05c6d9bae05a4a6f02721a 100644 (file)
@@ -1347,7 +1347,7 @@ void dmar_disable_qi(struct intel_iommu *iommu)
 
        raw_spin_lock_irqsave(&iommu->register_lock, flags);
 
-       sts =  dmar_readq(iommu->reg + DMAR_GSTS_REG);
+       sts =  readl(iommu->reg + DMAR_GSTS_REG);
        if (!(sts & DMA_GSTS_QIES))
                goto end;
 
index 1fae1881648c5a87e9071d1dc9ade123baab0252..e9b241b1c9dd8469aedaa51fda108c6b1e338450 100644 (file)
@@ -629,7 +629,7 @@ static void iommu_disable_irq_remapping(struct intel_iommu *iommu)
 
        raw_spin_lock_irqsave(&iommu->register_lock, flags);
 
-       sts = dmar_readq(iommu->reg + DMAR_GSTS_REG);
+       sts = readl(iommu->reg + DMAR_GSTS_REG);
        if (!(sts & DMA_GSTS_IRES))
                goto end;