Module: xenomai-forge
Branch: next
Commit: 7ca0c5f2054915c9fba903056f85cc13570f1f71
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7ca0c5f2054915c9fba903056f85cc13570f1f71

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Jun 29 16:53:09 2013 +0200

cobalt/arm: drop prev arg in __asm_thread_switch()

---

 kernel/cobalt/arch/arm/switch.S |   12 ++++++------
 kernel/cobalt/arch/arm/thread.c |    5 ++---
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/kernel/cobalt/arch/arm/switch.S b/kernel/cobalt/arch/arm/switch.S
index 8c88cee..969b28d 100644
--- a/kernel/cobalt/arch/arm/switch.S
+++ b/kernel/cobalt/arch/arm/switch.S
@@ -137,17 +137,17 @@ ENDPROC(__asm_vfp_load)
  *      CONFIG_IWMMXT
  *
  *  Calling args:
- * r0 = previous task_struct, r1 = previous thread_info, r2 = next thread_info
+ * r0 = previous thread_info, r1 = next thread_info
  */
 ENTRY(__asm_thread_switch)
-       add     ip, r1, #TI_CPU_SAVE
-       ldr     r3, [r2, #TI_TP_VALUE]
+       add     ip, r0, #TI_CPU_SAVE
+       ldr     r3, [r1, #TI_TP_VALUE]
  ARM(  stmia   ip!, {r4 - sl, fp, sp, lr} )    @ Store most regs on stack
  THUMB(        stmia   ip!, {r4 - sl, fp}         )    @ Store most regs on 
stack
  THUMB(        str     sp, [ip], #4               )
  THUMB(        str     lr, [ip], #4               )
 #ifdef USE_DOMAINS
-       ldr     r6, [r2, #TI_CPU_DOMAIN]
+       ldr     r6, [r1, #TI_CPU_DOMAIN]
 #endif
        clear_exclusive_monitor
        set_tls r3, r4, r5
@@ -155,9 +155,9 @@ ENTRY(__asm_thread_switch)
        mcr     p15, 0, r6, c3, c0, 0           @ Set domain register
 #endif
        fpu_switch r4
- ARM(  add     r4, r2, #TI_CPU_SAVE       )
+ ARM(  add     r4, r1, #TI_CPU_SAVE       )
  ARM(  ldmia   r4, {r4 - sl, fp, sp, pc}  )    @ Load all regs saved previously
- THUMB(        add     ip, r2, #TI_CPU_SAVE       )
+ THUMB(        add     ip, r1, #TI_CPU_SAVE       )
  THUMB(        ldmia   ip!, {r4 - sl, fp}         )    @ Load all regs saved 
previously
  THUMB(        ldr     sp, [ip], #4               )
  THUMB(        ldr     pc, [ip]                   )
diff --git a/kernel/cobalt/arch/arm/thread.c b/kernel/cobalt/arch/arm/thread.c
index 9c33f20..55313ab 100644
--- a/kernel/cobalt/arch/arm/thread.c
+++ b/kernel/cobalt/arch/arm/thread.c
@@ -26,8 +26,7 @@
 #include <asm/mmu_context.h>
 #include <cobalt/kernel/thread.h>
 
-asmlinkage void __asm_thread_switch(struct task_struct *prev,
-                                   struct thread_info *out,
+asmlinkage void __asm_thread_switch(struct thread_info *out,
                                    struct thread_info *in);
 
 asmlinkage void __asm_thread_trampoline(void);
@@ -289,7 +288,7 @@ void xnarch_switch_to(struct xnarchtcb *out_tcb, struct 
xnarchtcb *in_tcb)
                        enter_lazy_tlb(prev_mm, next);
        }
 
-       __asm_thread_switch(prev, out_tcb->core.tip, in_tcb->core.tip);
+       __asm_thread_switch(out_tcb->core.tip, in_tcb->core.tip);
 }
 
 void xnarch_enable_fpu(struct xnarchtcb *tcb)


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to