diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2020-01-18 00:04:03 +0100 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2020-01-18 01:53:44 +0100 |
commit | f45ba2bd6da0dc8000aa7ea7a3858fb51608f766 (patch) | |
tree | 3be8113cb45459531bc5ffee5bbbb1de38d5d234 /arch/arc/kernel/process.c | |
parent | ARC: fpu: declutter code, move bits out into fpu.h (diff) | |
download | linux-f45ba2bd6da0dc8000aa7ea7a3858fb51608f766.tar.xz linux-f45ba2bd6da0dc8000aa7ea7a3858fb51608f766.zip |
ARCv2: fpu: preserve userspace fpu state
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/process.c')
-rw-r--r-- | arch/arc/kernel/process.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c index bfd4cbe74aa3..315528f04bc1 100644 --- a/arch/arc/kernel/process.c +++ b/arch/arc/kernel/process.c @@ -20,6 +20,8 @@ #include <linux/elf.h> #include <linux/tick.h> +#include <asm/fpu.h> + SYSCALL_DEFINE1(arc_settls, void *, user_tls_data_ptr) { task_thread_info(current)->thr_ptr = (unsigned int)user_tls_data_ptr; @@ -263,7 +265,7 @@ int copy_thread_tls(unsigned long clone_flags, unsigned long usp, /* * Do necessary setup to start up a new user task */ -void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long usp) +void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp) { regs->sp = usp; regs->ret = pc; @@ -279,6 +281,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long usp) regs->eflags = 0; #endif + fpu_init_task(regs); + /* bogus seed values for debugging */ regs->lp_start = 0x10; regs->lp_end = 0x80; |