summaryrefslogtreecommitdiffstats
path: root/arch/sh/include
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-07-29 17:14:48 +0200
committerIngo Molnar <mingo@kernel.org>2015-08-04 09:38:05 +0200
commitb31fdac2a921c8bf5ed9fe2c908625a54ce91e92 (patch)
tree8bd5f5d5d57a5c615aed2604f43ad05859809877 /arch/sh/include
parent08960e344800267df4980c2180e3c2c0c9b5f460 (diff)
downloadlinux-b31fdac2a921c8bf5ed9fe2c908625a54ce91e92.tar.gz
linux-b31fdac2a921c8bf5ed9fe2c908625a54ce91e92.tar.bz2
linux-b31fdac2a921c8bf5ed9fe2c908625a54ce91e92.zip
sched, sh: Fold finish_arch_switch() into switch_to()
The code looks buggy; why would we be restoring the previous task's DSP state after we've switched to the next task? Fix that and put the restore in switch_to(), removing the need for finish_arch_switch(). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r--arch/sh/include/asm/switch_to_32.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/sh/include/asm/switch_to_32.h b/arch/sh/include/asm/switch_to_32.h
index 0c065513e7ac..7661b4ba8259 100644
--- a/arch/sh/include/asm/switch_to_32.h
+++ b/arch/sh/include/asm/switch_to_32.h
@@ -78,6 +78,8 @@ do { \
\
if (is_dsp_enabled(prev)) \
__save_dsp(prev); \
+ if (is_dsp_enabled(next)) \
+ __restore_dsp(next); \
\
__ts1 = (u32 *)&prev->thread.sp; \
__ts2 = (u32 *)&prev->thread.pc; \
@@ -125,10 +127,4 @@ do { \
last = __last; \
} while (0)
-#define finish_arch_switch(prev) \
-do { \
- if (is_dsp_enabled(prev)) \
- __restore_dsp(prev); \
-} while (0)
-
#endif /* __ASM_SH_SWITCH_TO_32_H */