riscv: Introduce set_compat_task() in asm/compat.h
authorLeonardo Bras <leobras@redhat.com>
Wed, 3 Jan 2024 16:00:23 +0000 (13:00 -0300)
committerPalmer Dabbelt <palmer@rivosinc.com>
Tue, 19 Mar 2024 23:39:40 +0000 (16:39 -0700)
commit2a8986fc5e1cb686dd3aae3022459aea23b9823a
treea416d98376eef7d0a3504ae7ac63b99c5966a4b5
parent5917ea17ad07f35bb5be4fd5fdcd408f090e347b
riscv: Introduce set_compat_task() in asm/compat.h

In order to have all task compat bit access directly in compat.h, introduce
set_compat_task() to set/reset those when needed.

Also, since it's only used on an if/else scenario, simplify the macro using
it.

Signed-off-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20240103160024.70305-7-leobras@redhat.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/compat.h
arch/riscv/include/asm/elf.h