From: Vasant Hegde <vasant.hegde@amd.com>
To: <iommu@lists.linux.dev>, <joro@8bytes.org>
Cc: <will@kernel.org>, <robin.murphy@arm.com>,
<suravee.suthikulpanit@amd.com>,
Vasant Hegde <vasant.hegde@amd.com>
Subject: [PATCH 3/4] iommu/amd: Remove redundant checks from interrupt handler path
Date: Fri, 11 Sep 2026 08:33:52 +0000 [thread overview]
Message-ID: <20260911083353.4812-4-vasant.hegde@amd.com> (raw)
In-Reply-To: <20260911083353.4812-1-vasant.hegde@amd.com>
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>
---
drivers/iommu/amd/iommu.c | 3 ---
drivers/iommu/amd/ppr.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 5bb7d8cb506e..ed38f2328618 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -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);
diff --git a/drivers/iommu/amd/ppr.c b/drivers/iommu/amd/ppr.c
index 76296079bb8b..2039a9dd71ac 100644
--- a/drivers/iommu/amd/ppr.c
+++ b/drivers/iommu/amd/ppr.c
@@ -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);
--
2.31.1
next prev parent reply other threads:[~2026-09-11 8:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 8:33 [PATCH 0/4] iommu/amd: Cleanup and fixes Vasant Hegde
2026-09-11 8:33 ` [PATCH 1/4] iommu/amd: Make iommu_sva_set_dev_pasid as static Vasant Hegde
2026-09-11 8:33 ` [PATCH 2/4] iommu/amd: Remove redundant check in irq_remapping_select() Vasant Hegde
2026-09-11 8:33 ` Vasant Hegde [this message]
2026-09-11 8:33 ` [PATCH 4/4] iommu/amd: Remove unused macro Vasant Hegde
2026-09-11 10:18 ` [PATCH 0/4] iommu/amd: Cleanup and fixes Vasant Hegde
2026-09-12 8:43 ` Jörg Rödel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260911083353.4812-4-vasant.hegde@amd.com \
--to=vasant.hegde@amd.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.