Skip to contentSkip to conversation

mn10300: let exit_fpu accept a task

PATCH New [email protected] 1 participant 1 message May 21, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 76/162 mn10300: let exit_fpu accept a task

From: Jiri Slaby <[email protected]>
Subject: 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.

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]>

---

 arch/mn10300/include/asm/fpu.h |    6 ++----
 arch/mn10300/kernel/process.c  |    2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)
arch/mn10300/include/asm/fpu.h renamed from arch/mn10300/include/asm/fpu.h~mn10300-let-exit_fpu-accept-a-task +2 -4
diff -puN arch/mn10300/include/asm/fpu.h~mn10300-let-exit_fpu-accept-a-task arch/mn10300/include/asm/fpu.h
@@ -76,11 +76,9 @@ static inline void unlazy_fpu(struct tas
 	preempt_enable();
 }
 
-static inline void exit_fpu(void)
+static inline void exit_fpu(struct task_struct *tsk)
 {
 #ifdef CONFIG_LAZY_SAVE_FPU
-	struct task_struct *tsk = current;
-
 	preempt_disable();
 	if (fpu_state_owner == tsk)
 		fpu_state_owner = NULL;
@@ -123,7 +121,7 @@ static inline void fpu_init_state(void)
 static inline void fpu_save(struct fpu_state_struct *s) {}
 static inline void fpu_kill_state(struct task_struct *tsk) {}
 static inline void unlazy_fpu(struct task_struct *tsk) {}
-static inline void exit_fpu(void) {}
+static inline void exit_fpu(struct task_struct *tsk) {}
 static inline void flush_fpu(void) {}
 static inline int fpu_setup_sigcontext(struct fpucontext *buf) { return 0; }
 static inline int fpu_restore_sigcontext(struct fpucontext *buf) { return 0; }
arch/mn10300/kernel/process.c renamed from arch/mn10300/kernel/process.c~mn10300-let-exit_fpu-accept-a-task +1 -1
diff -puN arch/mn10300/kernel/process.c~mn10300-let-exit_fpu-accept-a-task arch/mn10300/kernel/process.c
@@ -105,7 +105,7 @@ void show_regs(struct pt_regs *regs)
  */
 void exit_thread(void)
 {
-	exit_fpu();
+	exit_fpu(current);
 }
 
 void flush_thread(void)

_