Skip to content

RFC Introduce & Optimize compat-mode helpers

Leonardo Bras linux-mm linux-riscv lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4riscv: Replace direct thread flag check with is_compat_task()arch/riscv/include/asm/elf.h arch/riscv/include/asm/pgtable.h+2 -20 replies
2/4riscv: add compile-time test into is_compat_task()arch/riscv/include/asm/compat.h arch/riscv/include/asm/elf.h arch/riscv/include/asm/pgtable.h +1 more+5 -124 replies
3/4riscv: Introduce is_compat_thread() into compat.harch/riscv/include/asm/compat.h arch/riscv/kernel/ptrace.c+11 -35 replies
4/4riscv: Introduce set_compat_task() in asm/compat.harch/riscv/include/asm/compat.h arch/riscv/include/asm/elf.h+9 -42 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchGuo RenAndy Chiu
1/4
2/4R-b R-b
3/4R-b R-b
4/4R-b

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

Read the v1 thread

Cover letter [RFC PATCH 0/4] Introduce & Optimize compat-mode helpers

I just saw the opportunity of optimizing the helper is_compat_task() by introducing a compile-time test, and it made possible to remove some #ifdef's without any loss of performance.

I also saw the possibility of removing the direct check of task flags from general code, and concentrated it in asm/compat.h by creating a few more helpers, which in the end helped optimize code.

Leonardo Bras (4):
riscv: Replace direct thread flag check with is_compat_task()
riscv: add compile-time test into is_compat_task()
riscv: Introduce is_compat_thread() into compat.h
riscv: Introduce set_compat_task() in asm/compat.h

 arch/riscv/include/asm/compat.h    | 19 +++++++++++++++++++
 arch/riscv/include/asm/elf.h       | 11 ++---------
 arch/riscv/include/asm/pgtable.h   |  8 +-------
 arch/riscv/include/asm/processor.h |  4 ++--
 arch/riscv/kernel/ptrace.c         |  6 +++---
 5 files changed, 27 insertions(+), 21 deletions(-)

base-commit: 24e0d2e527a39f64caeb2e6be39ad5396fb2da5e

Signature · 1 line
2.43.0