Skip to content

Commit

Permalink
iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG
Browse files Browse the repository at this point in the history
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
  • Loading branch information
CQ Tang authored and David Woodhouse committed Jan 13, 2016
1 parent e57e58b commit fda3bec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/iommu/dmar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/iommu/intel_irq_remapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fda3bec

Please sign in to comment.