From: Sairaj Kodilkar <sarunkod@amd.com>
To: "Joerg Roedel (AMD)" <joro@8bytes.org>,
Adrian Huang <ahuang12@lenovo.com>,
Joerg Roedel <jroedel@suse.de>,
Robin Murphy <robin.murphy@arm.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Vasant Hegde <vasant.hegde@amd.com>,
"Will Deacon" <will@kernel.org>, <iommu@lists.linux.dev>
Cc: <Vasant.Hegde@amd.com>, <Suravee.Suthikulpanit@amd.com>,
Sairaj Kodilkar <sarunkod@amd.com>,
Akshay Jindal <Akshay.Jindal@amd.com>
Subject: [PATCH v5 1/3] iommu/amd: Rename exclusion range base and limit macros
Date: Fri, 27 Nov 2026 15:34:12 +0530 [thread overview]
Message-ID: <20261127100414.6980-2-sarunkod@amd.com> (raw)
In-Reply-To: <20261127100414.6980-1-sarunkod@amd.com>
From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
The exclusion range registers have been repurposed to SNP completion-wait
store base / limit registers. So, rename MMIO_EXCL_BASE/LIMIT via to
MMIO_COMPL_STORE_BASE/LIMIT instead.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
Reviewed-by: Akshay Jindal <Akshay.Jindal@amd.com>
---
drivers/iommu/amd/amd_iommu_types.h | 4 ++--
drivers/iommu/amd/init.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
index f98770db0090..d1602144c160 100644
--- a/drivers/iommu/amd/amd_iommu_types.h
+++ b/drivers/iommu/amd/amd_iommu_types.h
@@ -44,8 +44,8 @@
#define MMIO_CMD_BUF_OFFSET 0x0008
#define MMIO_EVT_BUF_OFFSET 0x0010
#define MMIO_CONTROL_OFFSET 0x0018
-#define MMIO_EXCL_BASE_OFFSET 0x0020
-#define MMIO_EXCL_LIMIT_OFFSET 0x0028
+#define MMIO_COMPL_STORE_BASE_OFFSET 0x0020
+#define MMIO_COMPL_STORE_LIMIT_OFFSET 0x0028
#define MMIO_EXT_FEATURES 0x0030
#define MMIO_PPR_LOG_OFFSET 0x0038
#define MMIO_GA_LOG_BASE_OFFSET 0x00e0
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 58f63298493b..f8cf37a471f8 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -369,14 +369,14 @@ static void iommu_set_cwwb_range(struct amd_iommu *iommu)
* Re-purpose Exclusion base/limit registers for Completion wait
* write-back base/limit.
*/
- memcpy_toio(iommu->mmio_base + MMIO_EXCL_BASE_OFFSET,
+ memcpy_toio(iommu->mmio_base + MMIO_COMPL_STORE_BASE_OFFSET,
&entry, sizeof(entry));
/* Note:
* Default to 4 Kbytes, which can be specified by setting base
* address equal to the limit address.
*/
- memcpy_toio(iommu->mmio_base + MMIO_EXCL_LIMIT_OFFSET,
+ memcpy_toio(iommu->mmio_base + MMIO_COMPL_STORE_LIMIT_OFFSET,
&entry, sizeof(entry));
}
@@ -1071,7 +1071,7 @@ static int __init remap_or_alloc_cwwb_sem(struct amd_iommu *iommu)
* completion wait buffer (CWB) address. Read and re-use it.
*/
pr_info_once("Re-using CWB buffers from the previous kernel\n");
- paddr = readq(iommu->mmio_base + MMIO_EXCL_BASE_OFFSET) & PM_ADDR_MASK;
+ paddr = readq(iommu->mmio_base + MMIO_COMPL_STORE_BASE_OFFSET) & PM_ADDR_MASK;
iommu->cmd_sem = iommu_memremap(paddr, PAGE_SIZE);
if (!iommu->cmd_sem)
return -ENOMEM;
--
2.34.1
next prev parent reply other threads:[~2026-11-27 10:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 10:04 [PATCH v5 0/3] iommu/amd: IVMD handling cleanup and ivmd= boot override Sairaj Kodilkar
2026-11-27 10:04 ` Sairaj Kodilkar [this message]
2026-11-27 10:04 ` [PATCH v5 2/3] iommu/amd: Do not convert IVMD exclusion range to unity range Sairaj Kodilkar
2026-12-01 8:50 ` Vasant Hegde
2026-12-01 12:01 ` Sairaj Kodilkar
2026-12-01 12:33 ` Sairaj Kodilkar
2026-11-27 10:04 ` [PATCH v5 3/3] iommu/amd: Rename unity_map symbols to ivmd_entry Sairaj Kodilkar
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=20261127100414.6980-2-sarunkod@amd.com \
--to=sarunkod@amd.com \
--cc=Akshay.Jindal@amd.com \
--cc=ahuang12@lenovo.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@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.