From: Jason Gunthorpe <jgg@nvidia.com>
To: Alexandre Ghiti <alex@ghiti.fr>,
Alim Akhtar <alim.akhtar@samsung.com>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Albert Ou <aou@eecs.berkeley.edu>,
asahi@lists.linux.dev,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Lu Baolu <baolu.lu@linux.intel.com>,
David Woodhouse <dwmw2@infradead.org>,
Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
Heiko Stuebner <heiko@sntech.de>,
iommu@lists.linux.dev, Janne Grunau <j@jannau.net>,
Jean-Philippe Brucker <jean-philippe@linaro.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Joerg Roedel <joro@8bytes.org>, Kevin Tian <kevin.tian@intel.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org,
linux-mediatek@lists.infradead.org,
linux-riscv@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-s390@vger.kernel.org,
linux-samsung-soc@vger.kernel.org, linux-sunxi@lists.linux.dev,
linux-tegra@vger.kernel.org,
Marek Szyprowski <m.szyprowski@samsung.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Matthew Rosato <mjrosato@linux.ibm.com>,
Neal Gompa <neal@gompa.dev>, Orson Zhai <orsonzhai@gmail.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Rob Clark <robdclark@gmail.com>,
Robin Murphy <robin.murphy@arm.com>,
Samuel Holland <samuel@sholland.org>,
Niklas Schnelle <schnelle@linux.ibm.com>,
Sven Peter <sven@svenpeter.dev>,
Thierry Reding <thierry.reding@gmail.com>,
Tomasz Jeznach <tjeznach@rivosinc.com>,
Krishna Reddy <vdumpa@nvidia.com>,
virtualization@lists.linux.dev, Chen-Yu Tsai <wens@csie.org>,
Will Deacon <will@kernel.org>, Yong Wu <yong.wu@mediatek.com>,
Chunyan Zhang <zhang.lyra@gmail.com>
Cc: patches@lists.linux.dev
Subject: [PATCH 3/7] iommu: Remove ops.pgsize_bitmap from drivers that don't use it
Date: Tue, 29 Apr 2025 11:34:13 -0300 [thread overview]
Message-ID: <3-v1-7c5282b0c334+2db-iommu_rm_ops_pgsize_jgg@nvidia.com> (raw)
In-Reply-To: <0-v1-7c5282b0c334+2db-iommu_rm_ops_pgsize_jgg@nvidia.com>
These drivers all set the domain->pgsize_bitmap in their
domain_alloc_paging() functions, so the ops value is never used. Delete
it.
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
---
drivers/iommu/apple-dart.c | 1 -
drivers/iommu/intel/iommu.c | 1 -
drivers/iommu/iommufd/selftest.c | 1 -
drivers/iommu/riscv/iommu.c | 1 -
drivers/iommu/virtio-iommu.c | 6 ++----
5 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index 757d24f67ad45a..190f28d7661515 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -991,7 +991,6 @@ static const struct iommu_ops apple_dart_iommu_ops = {
.of_xlate = apple_dart_of_xlate,
.def_domain_type = apple_dart_def_domain_type,
.get_resv_regions = apple_dart_get_resv_regions,
- .pgsize_bitmap = -1UL, /* Restricted during dart probe */
.owner = THIS_MODULE,
.default_domain_ops = &(const struct iommu_domain_ops) {
.attach_dev = apple_dart_attach_dev_paging,
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 82613f90dd01a2..e996f0259208f8 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -4407,7 +4407,6 @@ const struct iommu_ops intel_iommu_ops = {
.device_group = intel_iommu_device_group,
.is_attach_deferred = intel_iommu_is_attach_deferred,
.def_domain_type = device_def_domain_type,
- .pgsize_bitmap = SZ_4K,
.page_response = intel_iommu_page_response,
.default_domain_ops = &(const struct iommu_domain_ops) {
.attach_dev = intel_iommu_attach_device,
diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
index 6bd0abf9a641e2..c52bf037a2f01e 100644
--- a/drivers/iommu/iommufd/selftest.c
+++ b/drivers/iommu/iommufd/selftest.c
@@ -801,7 +801,6 @@ static const struct iommu_ops mock_ops = {
.default_domain = &mock_blocking_domain,
.blocked_domain = &mock_blocking_domain,
.owner = THIS_MODULE,
- .pgsize_bitmap = MOCK_IO_PAGE_SIZE,
.hw_info = mock_domain_hw_info,
.domain_alloc_paging_flags = mock_domain_alloc_paging_flags,
.domain_alloc_nested = mock_domain_alloc_nested,
diff --git a/drivers/iommu/riscv/iommu.c b/drivers/iommu/riscv/iommu.c
index bb57092ca90110..2d0d31ba28860a 100644
--- a/drivers/iommu/riscv/iommu.c
+++ b/drivers/iommu/riscv/iommu.c
@@ -1533,7 +1533,6 @@ static void riscv_iommu_release_device(struct device *dev)
}
static const struct iommu_ops riscv_iommu_ops = {
- .pgsize_bitmap = SZ_4K,
.of_xlate = riscv_iommu_of_xlate,
.identity_domain = &riscv_iommu_identity_domain,
.blocked_domain = &riscv_iommu_blocking_domain,
diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index ecd41fb03e5a51..532db1de201bae 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -998,7 +998,7 @@ static void viommu_get_resv_regions(struct device *dev, struct list_head *head)
iommu_dma_get_resv_regions(dev, head);
}
-static struct iommu_ops viommu_ops;
+static const struct iommu_ops viommu_ops;
static struct virtio_driver virtio_iommu_drv;
static int viommu_match_node(struct device *dev, const void *data)
@@ -1086,7 +1086,7 @@ static bool viommu_capable(struct device *dev, enum iommu_cap cap)
}
}
-static struct iommu_ops viommu_ops = {
+static const struct iommu_ops viommu_ops = {
.capable = viommu_capable,
.domain_alloc_identity = viommu_domain_alloc_identity,
.domain_alloc_paging = viommu_domain_alloc_paging,
@@ -1217,8 +1217,6 @@ static int viommu_probe(struct virtio_device *vdev)
viommu->first_domain++;
}
- viommu_ops.pgsize_bitmap = viommu->pgsize_bitmap;
-
virtio_device_ready(vdev);
/* Populate the event queue with buffers */
--
2.43.0
next prev parent reply other threads:[~2025-04-29 14:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 14:34 [PATCH 0/7] Remove ops.pgsize_bitmap Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 1/7] iommu/arm-smmu-v3: Remove iommu_ops pgsize_bitmap Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 2/7] iommu/arm-smmu: " Jason Gunthorpe
2025-04-29 14:34 ` Jason Gunthorpe [this message]
2025-04-30 2:32 ` [PATCH 3/7] iommu: Remove ops.pgsize_bitmap from drivers that don't use it Baolu Lu
2025-05-01 19:07 ` Sven Peter
2025-05-29 20:46 ` Tomasz Jeznach
2025-04-29 14:34 ` [PATCH 4/7] iommu: Remove iommu_ops pgsize_bitmap from simple drivers Jason Gunthorpe
2025-04-30 13:15 ` Niklas Schnelle
2025-04-30 13:21 ` Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 5/7] iommu/mtk: Remove iommu_ops pgsize_bitmap Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 6/7] iommu/qcom: " Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 7/7] iommu: Remove ops->pgsize_bitmap Jason Gunthorpe
2025-04-30 2:34 ` Baolu Lu
2025-04-30 9:16 ` [PATCH 0/7] Remove ops.pgsize_bitmap Tian, Kevin
2025-05-15 16:33 ` Will Deacon
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=3-v1-7c5282b0c334+2db-iommu_rm_ops_pgsize_jgg@nvidia.com \
--to=jgg@nvidia.com \
--cc=alex@ghiti.fr \
--cc=alim.akhtar@samsung.com \
--cc=alyssa@rosenzweig.io \
--cc=angelogioacchino.delregno@collabora.com \
--cc=aou@eecs.berkeley.edu \
--cc=asahi@lists.linux.dev \
--cc=baolin.wang@linux.alibaba.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=gerald.schaefer@linux.ibm.com \
--cc=heiko@sntech.de \
--cc=iommu@lists.linux.dev \
--cc=j@jannau.net \
--cc=jean-philippe@linaro.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=matthias.bgg@gmail.com \
--cc=mjrosato@linux.ibm.com \
--cc=neal@gompa.dev \
--cc=orsonzhai@gmail.com \
--cc=palmer@dabbelt.com \
--cc=patches@lists.linux.dev \
--cc=paul.walmsley@sifive.com \
--cc=robdclark@gmail.com \
--cc=robin.murphy@arm.com \
--cc=samuel@sholland.org \
--cc=schnelle@linux.ibm.com \
--cc=sven@svenpeter.dev \
--cc=thierry.reding@gmail.com \
--cc=tjeznach@rivosinc.com \
--cc=vdumpa@nvidia.com \
--cc=virtualization@lists.linux.dev \
--cc=wens@csie.org \
--cc=will@kernel.org \
--cc=yong.wu@mediatek.com \
--cc=zhang.lyra@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).