Commit 26de313f authored by Russell King's avatar Russell King

[ARM] Pass prev task_struct through __switch_to

parent c2133c96
......@@ -997,11 +997,11 @@ ENTRY(fp_enter)
* previous and next are guaranteed not to be the same.
*/
ENTRY(__switch_to)
add ip, r0, #TI_CPU_SAVE
ldr r2, [r1, #TI_CPU_DOMAIN]!
add ip, r1, #TI_CPU_SAVE
ldr r3, [r2, #TI_CPU_DOMAIN]!
stmia ip, {r4 - sl, fp, sp, lr} @ Store most regs on stack
mcr p15, 0, r2, c3, c0 @ Set domain register
ldmib r1, {r4 - sl, fp, sp, pc} @ Load all regs saved previously
mcr p15, 0, r3, c3, c0, 0 @ Set domain register
ldmib r2, {r4 - sl, fp, sp, pc} @ Load all regs saved previously
__INIT
/*
......
......@@ -75,7 +75,6 @@ no_work_pending:
* This is how we return from a fork.
*/
ENTRY(ret_from_fork)
ldr r0, [r0, #TI_TASK]
bl schedule_tail
get_thread_info tsk
ldr r1, [tsk, #TI_FLAGS] @ check for syscall tracing
......
......@@ -65,12 +65,13 @@ extern int cpu_architecture(void);
* The `mb' is to tell GCC not to cache `current' across this call.
*/
struct thread_info;
extern struct thread_info *__switch_to(struct thread_info *, struct thread_info *);
struct task_struct;
extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *);
#define switch_to(prev,next,last) \
do { \
__switch_to(prev->thread_info,next->thread_info); \
mb(); \
#define switch_to(prev,next,last) \
do { \
last = __switch_to(prev,prev->thread_info,next->thread_info); \
mb(); \
} while (0)
#ifdef CONFIG_SMP
......
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