Skip to content

Commit 2ec656e

Browse files
Jiri Slabytorvalds
authored andcommitted
mn10300: let exit_fpu accept a task
We need to call exit_thread from copy_process in a fail path. Since exit_thread on mn10300 calls exit_thread_runtime_instr, make it accept task_struct as a parameter now. Signed-off-by: Jiri Slaby <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Aurelien Jacquiot <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Chen Liqin <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Chris Zankel <[email protected]> Cc: David Howells <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Helge Deller <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: James Hogan <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Jesper Nilsson <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Jonas Bonn <[email protected]> Cc: Koichi Yasutake <[email protected]> Cc: Lennox Wu <[email protected]> Cc: Ley Foon Tan <[email protected]> Cc: Mark Salter <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Matt Turner <[email protected]> Cc: Max Filippov <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Simek <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Rich Felker <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Richard Kuo <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Russell King <[email protected]> Cc: Steven Miao <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tony Luck <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Will Deacon <[email protected]> Cc: Yoshinori Sato <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 1b3044e commit 2ec656e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

arch/mn10300/include/asm/fpu.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@ static inline void unlazy_fpu(struct task_struct *tsk)
7676
preempt_enable();
7777
}
7878

79-
static inline void exit_fpu(void)
79+
static inline void exit_fpu(struct task_struct *tsk)
8080
{
8181
#ifdef CONFIG_LAZY_SAVE_FPU
82-
struct task_struct *tsk = current;
83-
8482
preempt_disable();
8583
if (fpu_state_owner == tsk)
8684
fpu_state_owner = NULL;
@@ -123,7 +121,7 @@ static inline void fpu_init_state(void) {}
123121
static inline void fpu_save(struct fpu_state_struct *s) {}
124122
static inline void fpu_kill_state(struct task_struct *tsk) {}
125123
static inline void unlazy_fpu(struct task_struct *tsk) {}
126-
static inline void exit_fpu(void) {}
124+
static inline void exit_fpu(struct task_struct *tsk) {}
127125
static inline void flush_fpu(void) {}
128126
static inline int fpu_setup_sigcontext(struct fpucontext *buf) { return 0; }
129127
static inline int fpu_restore_sigcontext(struct fpucontext *buf) { return 0; }

arch/mn10300/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void show_regs(struct pt_regs *regs)
105105
*/
106106
void exit_thread(void)
107107
{
108-
exit_fpu();
108+
exit_fpu(current);
109109
}
110110

111111
void flush_thread(void)

0 commit comments

Comments
 (0)