Commit b31fdac2 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

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: default avatarPeter 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: default avatarIngo Molnar <mingo@kernel.org>
parent 08960e34
...@@ -78,6 +78,8 @@ do { \ ...@@ -78,6 +78,8 @@ do { \
\ \
if (is_dsp_enabled(prev)) \ if (is_dsp_enabled(prev)) \
__save_dsp(prev); \ __save_dsp(prev); \
if (is_dsp_enabled(next)) \
__restore_dsp(next); \
\ \
__ts1 = (u32 *)&prev->thread.sp; \ __ts1 = (u32 *)&prev->thread.sp; \
__ts2 = (u32 *)&prev->thread.pc; \ __ts2 = (u32 *)&prev->thread.pc; \
...@@ -125,10 +127,4 @@ do { \ ...@@ -125,10 +127,4 @@ do { \
last = __last; \ last = __last; \
} while (0) } 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 */ #endif /* __ASM_SH_SWITCH_TO_32_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment