Skip to content

riscv: cleanup assembly usage of ENTRY()/END() and use local labels

Clément Léger kvm kvm-riscv linux-riscv lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 8 repliesIn review 3 of 5 applied
  2. v15 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Remove duplicated SYM_FUNC_END(memmove)
- Use SYM_DATA for simple .quad usage
- Added Andrew Rb:

Patches in v2 3 of 5 applied

#Subject and filesSizeRepliesApplied
1/5riscv: use ".L" local labels in assembly when applicablearch/riscv/kernel/entry.S arch/riscv/kernel/head.S arch/riscv/kernel/mcount.S +1 more+46 -460 repliesApplied
2/5riscv: Use SYM_*() assembly macros instead of deprecated onesarch/riscv/kernel/copy-unaligned.S arch/riscv/kernel/fpu.S arch/riscv/kernel/head.S +14 more+60 -744 repliesApplied
3/5riscv: kernel: Use correct SYM_DATA_*() macro for dataarch/riscv/kernel/entry.S+4 -50 repliesApplied
4/5riscv: kvm: Use SYM_*() assembly macros instead of deprecated onesarch/riscv/kvm/vcpu_switch.S+12 -162 replies
5/5riscv: kvm: use ".L" local labels in assembly when applicablearch/riscv/kvm/vcpu_switch.S+2 -22 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchAndrew JonesPalmer Dabbelt
1/5R-b
2/5R-b
3/5R-b
4/5R-b A-b
5/5R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] riscv: cleanup assembly usage of ENTRY()/END() and use local labels

This series does a cleanup of all ENTRY()/END() macros that are used in arch/riscv/ as well as use of local labels. This allows to remove the use of the now deprecated ENTRY()/END()/WEAK() macros as well as using the new SYM_*() ones which provide a better understanding of what is meant to be annotated. Some wrong usage of SYM_FUNC_START() are also fixed in this series by using the correct annotations. Finally a few labels that were meant to be local have been renamed to use the .L suffix and thus not to be emitted as visible symbols.

Note: the patches have been split between arch/riscv/ and arch/riscv/kvm/ due to having different maintainers.

---

Changes in V2:
- Remove duplicated SYM_FUNC_END(memmove)
- Use SYM_DATA for simple .quad usage
- Added Andrew Rb:

Cl?ment L?ger (5):
riscv: use ".L" local labels in assembly when applicable
riscv: Use SYM_*() assembly macros instead of deprecated ones
riscv: kernel: Use correct SYM_DATA_*() macro for data
riscv: kvm: Use SYM_*() assembly macros instead of deprecated ones
riscv: kvm: use ".L" local labels in assembly when applicable

 arch/riscv/kernel/copy-unaligned.S            |  8 +--
 arch/riscv/kernel/entry.S                     | 19 +++----
 arch/riscv/kernel/fpu.S                       |  8 +--
 arch/riscv/kernel/head.S                      | 30 +++++-----
 arch/riscv/kernel/hibernate-asm.S             | 12 ++--
 arch/riscv/kernel/mcount-dyn.S                | 20 +++----
 arch/riscv/kernel/mcount.S                    | 18 +++---
 arch/riscv/kernel/probes/rethook_trampoline.S |  4 +-
 arch/riscv/kernel/suspend_entry.S             |  4 +-
 arch/riscv/kernel/vdso/flush_icache.S         |  4 +-
 arch/riscv/kernel/vdso/getcpu.S               |  4 +-
 arch/riscv/kernel/vdso/rt_sigreturn.S         |  4 +-
 arch/riscv/kernel/vdso/sys_hwprobe.S          |  4 +-
 arch/riscv/kvm/vcpu_switch.S                  | 32 +++++------
 arch/riscv/lib/memcpy.S                       |  6 +-
 arch/riscv/lib/memmove.S                      | 57 +++++++++----------
 arch/riscv/lib/memset.S                       |  6 +-
 arch/riscv/lib/uaccess.S                      | 11 ++--
 arch/riscv/purgatory/entry.S                  | 16 ++----
 19 files changed, 124 insertions(+), 143 deletions(-)
Signature · 1 line
2.42.0