]> git.hungrycats.org Git - linux/commitdiff
iommu/amd: Remove redundant checks from interrupt handler path
authorVasant Hegde <vasant.hegde@amd.com>
Fri, 11 Sep 2026 08:33:52 +0000 (08:33 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Fri, 11 Sep 2026 15:27:22 +0000 (17:27 +0200)
PPR and GAlog interrupt is enabled only if buffer is allocated.
(See amd_iommu_enable_ppr_log() and iommu_ga_log_enable()).

The duplicate check in interrupt hanlder path is unnecessary
and can be removed.

No functional changes.

Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/amd/iommu.c
drivers/iommu/amd/ppr.c

index 67a86b9e1eca1f92f6fc1e039df012cf17af7852..56262f6b1f7009f48bcb3235dbe27b644f0cbcb0 100644 (file)
@@ -1076,9 +1076,6 @@ static void iommu_poll_ga_log(struct amd_iommu *iommu)
 {
        u32 head, tail;
 
-       if (iommu->ga_log == NULL)
-               return;
-
        head = readl(iommu->mmio_base + MMIO_GA_HEAD_OFFSET);
        tail = readl(iommu->mmio_base + MMIO_GA_TAIL_OFFSET);
 
index 76296079bb8b105d923a67e1d86df0230f7fe9fd..2039a9dd71ac6832757fa9a2ea7f9a388ba3399b 100644 (file)
@@ -165,9 +165,6 @@ void amd_iommu_poll_ppr_log(struct amd_iommu *iommu)
 {
        u32 head, tail;
 
-       if (iommu->ppr_log == NULL)
-               return;
-
        head = readl(iommu->mmio_base + MMIO_PPR_HEAD_OFFSET);
        tail = readl(iommu->mmio_base + MMIO_PPR_TAIL_OFFSET);