]> git.ipfire.org Git - thirdparty/linux.git/commit
iommu/amd: Refactor IOMMU interrupt handling logic for Event, PPR, and GA logs
authorVasant Hegde <vasant.hegde@amd.com>
Wed, 28 Jun 2023 05:32:21 +0000 (05:32 +0000)
committerJoerg Roedel <jroedel@suse.de>
Fri, 14 Jul 2023 14:20:37 +0000 (16:20 +0200)
commit2379f3485239095b8782353c2431f3c97c275986
tree54db543e6fd2f6213a99d188fd6f9423042177f8
parent274c2218b8b29ea2e0404f97d52040deb16d42dd
iommu/amd: Refactor IOMMU interrupt handling logic for Event, PPR, and GA logs

The AMD IOMMU has three log buffers (i.e. Event, PPR, and GA). The IOMMU
driver processes these log entries when it receive an IOMMU interrupt.
Then, it needs to clear the corresponding interrupt status bits. Also, when
an overflow occurs, it needs to handle the log overflow by clearing the
specific overflow status bit and restart the log.

Since, logic for handling these logs is the same, refactor the code into a
helper function called amd_iommu_handle_irq(), which handles the steps
described. Then, reuse it for all types of log.

Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Vasant Hegde<vasant.hegde@amd.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/20230628053222.5962-2-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu.h
drivers/iommu/amd/iommu.c