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