-
- Downloads
riscv: compat: vdso: Add COMPAT_VDSO base code implementation
There is no vgettimeofday supported in rv32 that makes simple to generate rv32 vdso code which only needs riscv64 compiler. Other architectures need change compiler or -m (machine parameter) to support vdso32 compiling. If rv32 support vgettimeofday (which cause C compile) in future, we would add CROSS_COMPILE to support that makes more requirement on compiler enviornment. linux-rv64/arch/riscv/kernel/compat_vdso/compat_vdso.so.dbg: file format elf64-littleriscv Disassembly of section .text: 0000000000000800 <__vdso_rt_sigreturn>: 800: 08b00893 li a7,139 804: 00000073 ecall 808: 0000 unimp ... 000000000000080c <__vdso_getcpu>: 80c: 0a800893 li a7,168 810: 00000073 ecall 814: 8082 ret ... 0000000000000818 <__vdso_flush_icache>: 818: 10300893 li a7,259 81c: 00000073 ecall 820: 8082 ret linux-rv32/arch/riscv/kernel/vdso/vdso.so.dbg: file format elf32-littleriscv Disassembly of section .text: 00000800 <__vdso_rt_sigreturn>: 800: 08b00893 li a7,139 804: 00000073 ecall 808: 0000 unimp ... 0000080c <__vdso_getcpu>: 80c: 0a800893 li a7,168 810: 00000073 ecall 814: 8082 ret ... 00000818 <__vdso_flush_icache>: 818: 10300893 li a7,259 81c: 00000073 ecall 820: 8082 ret Finally, reuse all *.S from vdso in compat_vdso that makes implementation clear and readable. Signed-off-by:Guo Ren <guoren@linux.alibaba.com> Signed-off-by:
Guo Ren <guoren@kernel.org> Tested-by:
Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20220405071314.3225832-17-guoren@kernel.org Signed-off-by:
Palmer Dabbelt <palmer@rivosinc.com>
Showing
- arch/riscv/Makefile 5 additions, 0 deletionsarch/riscv/Makefile
- arch/riscv/include/asm/vdso.h 9 additions, 0 deletionsarch/riscv/include/asm/vdso.h
- arch/riscv/kernel/Makefile 1 addition, 0 deletionsarch/riscv/kernel/Makefile
- arch/riscv/kernel/compat_vdso/.gitignore 2 additions, 0 deletionsarch/riscv/kernel/compat_vdso/.gitignore
- arch/riscv/kernel/compat_vdso/Makefile 78 additions, 0 deletionsarch/riscv/kernel/compat_vdso/Makefile
- arch/riscv/kernel/compat_vdso/compat_vdso.S 8 additions, 0 deletionsarch/riscv/kernel/compat_vdso/compat_vdso.S
- arch/riscv/kernel/compat_vdso/compat_vdso.lds.S 3 additions, 0 deletionsarch/riscv/kernel/compat_vdso/compat_vdso.lds.S
- arch/riscv/kernel/compat_vdso/flush_icache.S 3 additions, 0 deletionsarch/riscv/kernel/compat_vdso/flush_icache.S
- arch/riscv/kernel/compat_vdso/gen_compat_vdso_offsets.sh 5 additions, 0 deletionsarch/riscv/kernel/compat_vdso/gen_compat_vdso_offsets.sh
- arch/riscv/kernel/compat_vdso/getcpu.S 3 additions, 0 deletionsarch/riscv/kernel/compat_vdso/getcpu.S
- arch/riscv/kernel/compat_vdso/note.S 3 additions, 0 deletionsarch/riscv/kernel/compat_vdso/note.S
- arch/riscv/kernel/compat_vdso/rt_sigreturn.S 3 additions, 0 deletionsarch/riscv/kernel/compat_vdso/rt_sigreturn.S
- arch/riscv/kernel/vdso/vdso.S 5 additions, 1 deletionarch/riscv/kernel/vdso/vdso.S
Loading
Please register or sign in to comment