mbox series

[RFC,0/1] riscv: Allow disable vdso support

Message ID cover.1684430522.git.falcon@tinylab.org (mailing list archive)
Headers show
Series riscv: Allow disable vdso support | expand

Message

Zhangjin Wu May 18, 2023, 5:47 p.m. UTC
This is part of my tinylinux work for RISC-V, see related patchsets:

* RISC-V: Enable dead code elimination, v3 [1]
* tools/nolibc: riscv: Fix up compile error for rv32, v1 [2]
* Add dead syscalls elimination support, RFC [3]

This patch allows to remove the whole vdso support out of the kernel
binary and shrink 4KB for compat vdso and shrink another 8KB for vdso.

Unfortunately, just found there is a big vdso framework change from the
just sent-out RFC patchset from Guoren:

    * riscv: s64ilp32: Running 32-bit Linux kernel on 64-bit supervisor mode [4]

That patchset unifies vdso32 & compat_vdso into vdso/Makefile, so, it is
possible to rebase our work on that patchset or simply let VDSO64 and
VDSO32 configurable in that patchset.

Best Regards,
Zhangjin Wu
---

[1]: https://lore.kernel.org/linux-riscv/20230517084134.37892-1-falcon@tinylab.org/T/#t
[2]: https://lore.kernel.org/linux-riscv/cover.1684425792.git.falcon@tinylab.org/T/#t
[3]: https://lore.kernel.org/linux-riscv/cover.1676594211.git.falcon@tinylab.org/
[4]: https://lore.kernel.org/linux-riscv/mhng-24855381-7da8-4c77-bcaf-a3a53c8cb38b@palmer-ri-x1c9/T/#t

Zhangjin Wu (1):
  riscv: add Kconfig.vdso

 arch/riscv/Kconfig                |  6 +-----
 arch/riscv/Kconfig.vdso           | 28 ++++++++++++++++++++++++++++
 arch/riscv/Makefile               |  8 +++++---
 arch/riscv/include/asm/elf.h      |  6 ++++--
 arch/riscv/include/asm/mmu.h      |  2 ++
 arch/riscv/include/asm/vdso.h     |  8 ++++----
 arch/riscv/kernel/Makefile        |  4 ++--
 arch/riscv/kernel/alternative.c   |  2 +-
 arch/riscv/kernel/compat_signal.c |  2 ++
 arch/riscv/kernel/entry.S         |  2 +-
 arch/riscv/kernel/signal.c        |  4 ++--
 arch/riscv/kernel/sys_riscv.c     |  2 +-
 arch/riscv/kernel/vdso.c          | 10 +++++-----
 13 files changed, 58 insertions(+), 26 deletions(-)
 create mode 100644 arch/riscv/Kconfig.vdso