diff options
author | Andy Chiu <[email protected]> | 2024-01-15 05:59:26 +0000 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2024-01-16 07:13:59 -0800 |
commit | d6c78f1ca3e8ec3fd1afa1bc567cdf083e7af9fe (patch) | |
tree | 3579ec9196e6be855607804bb5b4d1274089b8af /arch/riscv/include/asm/entry-common.h | |
parent | a93fdaf183125fea81f66b9bd756ef5a0c30859e (diff) |
riscv: vector: do not pass task_struct into riscv_v_vstate_{save,restore}()
riscv_v_vstate_{save,restore}() can operate only on the knowlege of
struct __riscv_v_ext_state, and struct pt_regs. Let the caller decides
which should be passed into the function. Meanwhile, the kernel-mode
Vector is going to introduce another vstate, so this also makes functions
potentially able to be reused.
Signed-off-by: Andy Chiu <[email protected]>
Acked-by: Conor Dooley <[email protected]>
Tested-by: Björn Töpel <[email protected]>
Tested-by: Lad Prabhakar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'arch/riscv/include/asm/entry-common.h')
-rw-r--r-- | arch/riscv/include/asm/entry-common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/entry-common.h b/arch/riscv/include/asm/entry-common.h index 19023c430a9b..2293e535f865 100644 --- a/arch/riscv/include/asm/entry-common.h +++ b/arch/riscv/include/asm/entry-common.h @@ -16,7 +16,7 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs, * We are already called with irq disabled, so go without * keeping track of riscv_v_flags. */ - riscv_v_vstate_restore(current, regs); + riscv_v_vstate_restore(¤t->thread.vstate, regs); } } |