diff options
author | Vasant Hegde <vasant.hegde@amd.com> | 2024-04-18 10:33:50 +0000 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2024-04-26 12:15:59 +0200 |
commit | 7c5b7176f0c3996adbe853adb1f857bd4f82b1e2 (patch) | |
tree | f5487a0ff900c7a57657524819d9aecb286b07b4 /drivers/iommu/amd | |
parent | e08fcd901c4301c150a8212df28df7f4d4811988 (diff) |
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>
Diffstat (limited to 'drivers/iommu/amd')
-rw-r--r-- | drivers/iommu/amd/ppr.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/iommu/amd/ppr.c b/drivers/iommu/amd/ppr.c index 1f76ed549ec1..65db1745f40c 100644 --- a/drivers/iommu/amd/ppr.c +++ b/drivers/iommu/amd/ppr.c @@ -106,9 +106,5 @@ void amd_iommu_poll_ppr_log(struct amd_iommu *iommu) writel(head, iommu->mmio_base + MMIO_PPR_HEAD_OFFSET); /* TODO: PPR Handler will be added when we add IOPF support */ - - /* Refresh ring-buffer information */ - head = readl(iommu->mmio_base + MMIO_PPR_HEAD_OFFSET); - tail = readl(iommu->mmio_base + MMIO_PPR_TAIL_OFFSET); } } |