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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Feb 2016 19:57:49 +0000 (11:57 -0800)
commit fda3bec12d0979aae3f02ee645913d66fbc8a26e upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/dmar.c
drivers/iommu/intel_irq_remapping.c

index a7967ceb79e6f20336354c14ae9511eb3e79c20b..3d4622cae2cfd935183608fb33b43809e71e0468 100644 (file)
@@ -968,7 +968,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 45011f63ad162c2c55770a91f6e2fb94358b49a0..990cc298824af218d7b3c07262588a0e709606e9 100644 (file)
@@ -495,7 +495,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;