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 <thomas.lendacky@amd.com> Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20240418103400.6229-6-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent e08fcd9 commit 7c5b717

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

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)