[PATCH v1 9/9] dma-mapping: remove unused map_page callback
Leon Romanovsky
leon at kernel.org
Mon Sep 29 01:28:30 AEST 2025
On Sun, Sep 28, 2025 at 05:17:25PM +0200, Sam Ravnborg wrote:
> Hi Leon.
>
> On Sun, Sep 28, 2025 at 06:02:29PM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro at nvidia.com>
> >
> > After conversion of arch code to use physical address mapping,
> > there are no users of .map_page() and .unmap_page() callbacks,
> > so let's remove them.
> >
> > Signed-off-by: Leon Romanovsky <leonro at nvidia.com>
> > ---
> > include/linux/dma-map-ops.h | 7 -------
> > kernel/dma/mapping.c | 12 ------------
> > kernel/dma/ops_helpers.c | 8 +-------
> > 3 files changed, 1 insertion(+), 26 deletions(-)
>
> It looks like you missed a few sparc32 bits:
> mm/iommu.c:
> static const struct dma_map_ops sbus_iommu_dma_gflush_ops = {
> #ifdef CONFIG_SBUS
> .alloc = sbus_iommu_alloc,
> .free = sbus_iommu_free,
> #endif
> .map_page = sbus_iommu_map_page_gflush,
> .unmap_page = sbus_iommu_unmap_page,
> .map_sg = sbus_iommu_map_sg_gflush,
>
> mm/io-unit.c:
> static const struct dma_map_ops iounit_dma_ops = {
> #ifdef CONFIG_SBUS
> .alloc = iounit_alloc,
> .free = iounit_free,
> #endif
> .map_page = iounit_map_page,
> .unmap_page = iounit_unmap_page,
> .map_sg = iounit_map_sg,
>
> I did not compile test, but from a quick look they need to be updated.
There were updated, see patch #5.
https://lore.kernel.org/all/bac909dab3c82fc6a7a4f5a31f22bac9a69f7f07.1759071169.git.leon@kernel.org/T/#u
arch/sparc/mm/iommu.c:
426 static const struct dma_map_ops sbus_iommu_dma_gflush_ops = {
427 #ifdef CONFIG_SBUS
428 .alloc = sbus_iommu_alloc,
429 .free = sbus_iommu_free,
430 #endif
431 .map_phys = sbus_iommu_map_phys_gflush,
432 .unmap_phys = sbus_iommu_unmap_phys,
433 .map_sg = sbus_iommu_map_sg_gflush,
434 .unmap_sg = sbus_iommu_unmap_sg,
435 };
arch/sparc/mm/io-unit.c:
276 static const struct dma_map_ops iounit_dma_ops = {
277 #ifdef CONFIG_SBUS
278 .alloc = iounit_alloc,
279 .free = iounit_free,
280 #endif
281 .map_phys = iounit_map_phys,
282 .unmap_phys = iounit_unmap_phys,
283 .map_sg = iounit_map_sg,
284 .unmap_sg = iounit_unmap_sg,
285 };
Thanks
>
> Sam
>
More information about the Linuxppc-dev
mailing list