]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: enable HAVE_IOREMAP_PROT
authorYufeng Wang <wangyufeng@kylinos.cn>
Sat, 4 Apr 2026 01:28:47 +0000 (19:28 -0600)
committerPaul Walmsley <pjw@kernel.org>
Sun, 5 Apr 2026 00:42:44 +0000 (18:42 -0600)
RISC-V has implemented pte_pgprot() and selects GENERIC_IOREMAP,
which provides a generic ioremap_prot() implementation. Enable
HAVE_IOREMAP_PROT to activate generic_access_phys() support, which
is useful for debugging (e.g., accessing /dev/mem via gdb).

Also update the architecture support documentation accordingly.

Signed-off-by: Yufeng Wang <wangyufeng@kylinos.cn>
Link: https://patch.msgid.link/20260306112734.108186-1-r4o5m6e8o@163.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Documentation/features/vm/ioremap_prot/arch-support.txt
arch/riscv/Kconfig

index 1638c2cb17f15cb2a61ecfec64b3fc4786fca561..c0a2d8f5604685029217dd6daab63122910a72ae 100644 (file)
@@ -20,7 +20,7 @@
     |    openrisc: | TODO |
     |      parisc: | TODO |
     |     powerpc: |  ok  |
-    |       riscv: | TODO |
+    |       riscv: |  ok  |
     |        s390: |  ok  |
     |          sh: |  ok  |
     |       sparc: | TODO |
index 90c531e6abf5cf63355615a4536d63d08d764e48..32b6aa8dece75d931d7bb68e0e156a777349c71a 100644 (file)
@@ -113,6 +113,7 @@ config RISCV
        select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO && 64BIT
        select GENERIC_IDLE_POLL_SETUP
        select GENERIC_IOREMAP if MMU
+       select HAVE_IOREMAP_PROT if MMU
        select GENERIC_IRQ_IPI if SMP
        select GENERIC_IRQ_IPI_MUX if SMP
        select GENERIC_IRQ_MULTI_HANDLER