Skip to contentSkip to conversation

iommu/amd: Re-enable IOMMU event log interrupt after handling.

PATCH Applied [email protected] 2 participants 2 messages Mar 27, 2013 – Apr 2, 2013 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 iommu/amd: Re-enable IOMMU event log interrupt after handling.

From: Suravee Suthikulpanit <[email protected]>

Current driver does not clear the IOMMU event log interrupt bit in the IOMMU status register after processing an interrupt. This causes the IOMMU hardware to generate event log interrupt only once. This has been observed in both IOMMU v1 and V2 hardware.
This patch clears the bit by writing 1 to bit 1 of the IOMMU status register (MMIO Offset 2020h)

---
 drivers/iommu/amd_iommu.c       |    3 +++
 drivers/iommu/amd_iommu_types.h |    1 +
 2 files changed, 4 insertions(+)
drivers/iommu/amd_iommu.c +3 -0
index 30ac0cb..13a4f63 100644
@@ -809,6 +809,9 @@ static void iommu_poll_events(struct amd_iommu *iommu)
 	u32 head, tail;
 	unsigned long flags;
 
+	/* enable event interrupts again */
+	writel(MMIO_STATUS_EVT_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET);
+
 	spin_lock_irqsave(&iommu->lock, flags);
 
 	head = readl(iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);
drivers/iommu/amd_iommu_types.h +1 -0
index e38ab43..083f98c 100644
@@ -99,6 +99,7 @@
 #define PASID_MASK		0x000fffff
 
 /* MMIO status bits */
+#define MMIO_STATUS_EVT_INT_MASK	(1 << 1)
 #define MMIO_STATUS_COM_WAIT_INT_MASK	(1 << 2)
 #define MMIO_STATUS_PPR_INT_MASK	(1 << 6)
 
Signature · 1 line
1.7.10.4
maintainer Applied
#1 lore raw
Quoted 10 lines · On Wed, Mar 27, 2013 at 06:51:52PM -0500…

From: Suravee Suthikulpanit <[email protected]>

Current driver does not clear the IOMMU event log interrupt bit in the IOMMU status register after processing an interrupt. This causes the IOMMU hardware to generate event log interrupt only once. This has been observed in both IOMMU v1 and V2 hardware.
This patch clears the bit by writing 1 to bit 1 of the IOMMU status register (MMIO Offset 2020h)

Applied to x86/amd, thanks.