diff options
author | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-08-26 08:52:45 +0300 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-08-26 08:58:30 +0300 |
commit | a290f510a178830a01bfc06e66a54bbe4ece5d2a (patch) | |
tree | 878730361ece78887c30adb9d2e400a274176996 /arch/riscv/include/asm | |
parent | 803930ee35fafd005fd978d0c0a0d8db5bcba654 (diff) | |
download | linux-a290f510a178830a01bfc06e66a54bbe4ece5d2a.tar.xz |
RISC-V: Fix VDSO build for !MMU
We don't have a VDSO for the !MMU configurations, so don't try to build
one.
Fixes: fde9c59aebaf ("riscv: explicitly use symbol offsets for VDSO")
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include/asm')
-rw-r--r-- | arch/riscv/include/asm/vdso.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/vdso.h b/arch/riscv/include/asm/vdso.h index d8d003c2b5a3..893e47195e30 100644 --- a/arch/riscv/include/asm/vdso.h +++ b/arch/riscv/include/asm/vdso.h @@ -8,6 +8,13 @@ #ifndef _ASM_RISCV_VDSO_H #define _ASM_RISCV_VDSO_H + +/* + * All systems with an MMU have a VDSO, but systems without an MMU don't + * support shared libraries and therefor don't have one. + */ +#ifdef CONFIG_MMU + #include <linux/types.h> #include <generated/vdso-offsets.h> @@ -19,6 +26,8 @@ struct vdso_data { #define VDSO_SYMBOL(base, name) \ (void __user *)((unsigned long)(base) + __vdso_##name##_offset) +#endif /* CONFIG_MMU */ + asmlinkage long sys_riscv_flush_icache(uintptr_t, uintptr_t, uintptr_t); #endif /* _ASM_RISCV_VDSO_H */ |