mbox series

[v1,0/5] riscv: Introduce compat-mode helpers & improve arch_get_mmap_end()

Message ID 20240103160024.70305-2-leobras@redhat.com (mailing list archive)
Headers show
Series riscv: Introduce compat-mode helpers & improve arch_get_mmap_end() | expand

Message

Leonardo Bras Jan. 3, 2024, 4 p.m. UTC
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.

arch_get_mmap_end() just got a simple improvement and some extra docs.

Changes since RFC:
- Fused with other patchset:  Improve arch_get_mmap_end() macro
- Renamed from "Introduce & Optimize compat-mode helpers"

Leonardo Bras (5):
  riscv: Improve arch_get_mmap_end() macro
  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 | 16 +++++++++++-----
 arch/riscv/kernel/ptrace.c         |  6 +++---
 5 files changed, 36 insertions(+), 24 deletions(-)


base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a

Comments

patchwork-bot+linux-riscv@kernel.org March 20, 2024, 8:50 p.m. UTC | #1
Hello:

This series was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Wed,  3 Jan 2024 13:00:18 -0300 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [v1,1/5] riscv: Improve arch_get_mmap_end() macro
    https://git.kernel.org/riscv/c/6be7ee4bebd1
  - [v1,2/5] riscv: Replace direct thread flag check with is_compat_task()
    https://git.kernel.org/riscv/c/9dc30419248f
  - [v1,3/5] riscv: add compile-time test into is_compat_task()
    https://git.kernel.org/riscv/c/4c0b5a451675
  - [v1,4/5] riscv: Introduce is_compat_thread() into compat.h
    https://git.kernel.org/riscv/c/5917ea17ad07
  - [v1,5/5] riscv: Introduce set_compat_task() in asm/compat.h
    https://git.kernel.org/riscv/c/2a8986fc5e1c

You are awesome, thank you!