Skip to content

Commit 7c5b717

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd: Fix PPR interrupt processing logic
* Do not re-read ppr head pointer as its just updated by the driver. * Do not read PPR buffer tail pointer inside while loop. If IOMMU generates PPR events continuously then completing interrupt processing takes long time. In worst case it may cause infinite loop. Suggested-by: Tom Lendacky <[email protected]> Signed-off-by: Vasant Hegde <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent e08fcd9 commit 7c5b717

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/iommu/amd/ppr.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,5 @@ void amd_iommu_poll_ppr_log(struct amd_iommu *iommu)
106106
writel(head, iommu->mmio_base + MMIO_PPR_HEAD_OFFSET);
107107

108108
/* TODO: PPR Handler will be added when we add IOPF support */
109-
110-
/* Refresh ring-buffer information */
111-
head = readl(iommu->mmio_base + MMIO_PPR_HEAD_OFFSET);
112-
tail = readl(iommu->mmio_base + MMIO_PPR_TAIL_OFFSET);
113109
}
114110
}

0 commit comments

Comments
 (0)