]> git.ipfire.org Git - thirdparty/linux.git/commit
iommu/riscv: Allow RISC_VIOMMU to COMPILE_TEST
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 27 Feb 2026 15:25:41 +0000 (11:25 -0400)
committerJoerg Roedel <joerg.roedel@amd.com>
Tue, 17 Mar 2026 12:14:24 +0000 (13:14 +0100)
commit7cd0c655f02f08a5de851059ac8360e5d10fae62
tree50245d86dcd6289cbea3fcf7784a2235804c16f2
parentc70d20b25ca30d68b377b9363a2adca6eb2538e3
iommu/riscv: Allow RISC_VIOMMU to COMPILE_TEST

This driver used to use a lot of page table constants from the architecture
code which prevented COMPILE_TEST on other architectures. Now that iommupt
provides all of the constants internally there are only two small bumps
preventing COMPILE_TEST.

- Use the generic functions for the riscv specific phys_to_pfn() and
  pfn_to_phys()

- Use CONFIG_MMIOWB to block off the mmiowb() barrier

- Require 64 bit because of writeq use failing compilation on 32 bit

Tested-by: Vincent Chen <vincent.chen@sifive.com>
Acked-by: Paul Walmsley <pjw@kernel.org> # arch/riscv
Reviewed-by: Tomasz Jeznach <tjeznach@rivosinc.com>
Tested-by: Tomasz Jeznach <tjeznach@rivosinc.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/riscv/Kconfig
drivers/iommu/riscv/iommu-bits.h
drivers/iommu/riscv/iommu.c