aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/include/asm/pgtable.h
diff options
context:
space:
mode:
authorAlexandre Ghiti <alex@ghiti.fr>2021-06-04 13:49:48 +0200
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-06-11 14:29:17 -0700
commit7094e6acaf7ab869a1f1c34825ba1fe3173fe350 (patch)
tree4b44d1627606421f2ac16cf73be5c2ddda1723c5 /arch/riscv/include/asm/pgtable.h
parentriscv: Remove CONFIG_PHYS_RAM_BASE_FIXED (diff)
downloadlinux-dev-7094e6acaf7ab869a1f1c34825ba1fe3173fe350.tar.xz
linux-dev-7094e6acaf7ab869a1f1c34825ba1fe3173fe350.zip
riscv: Simplify xip and !xip kernel address conversion macros
To simplify the kernel address conversion code, make the same definition of kernel_mapping_pa_to_va and kernel_mapping_va_to_pa compatible for both xip and !xip kernel by defining XIP_OFFSET to 0 in !xip kernel. Signed-off-by: Alexandre Ghiti <alex@ghiti.fr> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include/asm/pgtable.h')
-rw-r--r--arch/riscv/include/asm/pgtable.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 9469f464e71a..0344c060ca41 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -77,6 +77,8 @@
#ifdef CONFIG_XIP_KERNEL
#define XIP_OFFSET SZ_8M
+#else
+#define XIP_OFFSET 0
#endif
#ifndef __ASSEMBLY__