Diff
Modified: trunk/arch/blackfin/include/asm/context.S (8145 => 8146)
--- trunk/arch/blackfin/include/asm/context.S 2010-01-12 10:58:29 UTC (rev 8145)
+++ trunk/arch/blackfin/include/asm/context.S 2010-01-12 19:20:54 UTC (rev 8146)
@@ -374,3 +374,13 @@
(R7:0, P5:0) = [SP++];
.endm
+
+.macro pseudo_long_call func:req, scratch:req
+#ifdef CONFIG_ROMKERNEL
+ \scratch\().l = \func;
+ \scratch\().h = \func;
+ call (\scratch);
+#else
+ call \func;
+#endif
+.endm
Modified: trunk/arch/blackfin/kernel/entry.S (8145 => 8146)
--- trunk/arch/blackfin/kernel/entry.S 2010-01-12 10:58:29 UTC (rev 8145)
+++ trunk/arch/blackfin/kernel/entry.S 2010-01-12 19:20:54 UTC (rev 8146)
@@ -44,13 +44,7 @@
sti r4;
#endif /* CONFIG_IPIPE */
SP += -12;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _schedule_tail;
- p5.h = _schedule_tail;
- call ( p5 );
-#else
- call _schedule_tail;
-#endif
+ pseudo_long_call _schedule_tail, p5;
SP += 12;
r0 = [sp + PT_IPEND];
cc = bittst(r0,1);
@@ -85,13 +79,7 @@
r0 += 24;
[--sp] = rets;
SP += -12;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _bfin_vfork;
- p5.h = _bfin_vfork;
- call ( p5 );
-#else
- call _bfin_vfork;
-#endif
+ pseudo_long_call _bfin_vfork, p5;
SP += 12;
rets = [sp++];
rts;
@@ -102,13 +90,7 @@
r0 += 24;
[--sp] = rets;
SP += -12;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _bfin_clone;
- p5.h = _bfin_clone;
- call ( p5 );
-#else
- call _bfin_clone;
-#endif
+ pseudo_long_call _bfin_clone, p5;
SP += 12;
rets = [sp++];
rts;
@@ -119,13 +101,7 @@
r0 += 24;
[--sp] = rets;
SP += -12;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _do_rt_sigreturn;
- p5.h = _do_rt_sigreturn;
- call ( p5 );
-#else
- call _do_rt_sigreturn;
-#endif
+ pseudo_long_call _do_rt_sigreturn, p5;
SP += 12;
rets = [sp++];
rts;
Modified: trunk/arch/blackfin/mach-common/entry.S (8145 => 8146)
--- trunk/arch/blackfin/mach-common/entry.S 2010-01-12 10:58:29 UTC (rev 8145)
+++ trunk/arch/blackfin/mach-common/entry.S 2010-01-12 19:20:54 UTC (rev 8146)
@@ -405,13 +405,7 @@
r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
SP += -12;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _double_fault_c;
- p5.h = _double_fault_c;
- call ( p5 );
-#else
- call _double_fault_c;
-#endif
+ pseudo_long_call _double_fault_c, p5;
SP += 12;
.L_double_fault_panic:
JUMP .L_double_fault_panic
@@ -453,13 +447,7 @@
r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
SP += -12;
-#if defined(CONFIG_ROMKERNEL)
- p4.l = _trap_c;
- p4.h = _trap_c;
- call ( p4 );
-#else
- call _trap_c;
-#endif
+ pseudo_long_call _trap_c, p4;
SP += 12;
/* If interrupts were off during the exception (IPEND[4] = 1), turn them off
@@ -563,13 +551,7 @@
p0 = sp;
sp += -16;
[sp + 12] = p0;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _do_execve;
- p5.h = _do_execve;
- call ( p5 );
-#else
- call _do_execve;
-#endif
+ pseudo_long_call _do_execve, p5;
SP += 16;
cc = r0 == 0;
if ! cc jump .Lexecve_failed;
@@ -722,13 +704,7 @@
sp += 4;
SP += -12;
-#if defined(CONFIG_ROMKERNEL)
- p4.l = _schedule;
- p4.h = _schedule;
- call ( p4 );
-#else
- call _schedule;
-#endif
+ pseudo_long_call _schedule, p4;
SP += 12;
jump .Lresume_userspace_1;
@@ -747,13 +723,7 @@
r0 = sp;
SP += -12;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _do_notify_resume;
- p5.h = _do_notify_resume;
- call ( p5 );
-#else
- call _do_notify_resume;
-#endif
+ pseudo_long_call _do_notify_resume, p5;
SP += 12;
.Lsyscall_really_exit:
@@ -766,13 +736,7 @@
* this symbol need not be global anyways, so ...
*/
_sys_trace:
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _syscall_trace;
- p5.h = _syscall_trace;
- call ( p5 );
-#else
- call _syscall_trace;
-#endif
+ pseudo_long_call _syscall_trace, p5;
/* Execute the appropriate system call */
@@ -796,13 +760,7 @@
SP += 24;
[sp + PT_R0] = r0;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _syscall_trace;
- p5.h = _syscall_trace;
- call ( p5 );
-#else
- call _syscall_trace;
-#endif
+ pseudo_long_call _syscall_trace, p5;
jump .Lresume_userspace;
ENDPROC(_sys_trace)
@@ -1050,13 +1008,7 @@
r0 = sp;
sp += -12;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _finish_atomic_sections;
- p5.h = _finish_atomic_sections;
- call ( p5 );
-#else
- call _finish_atomic_sections;
-#endif
+ pseudo_long_call _finish_atomic_sections, p5;
sp += 12;
jump.s .Lresume_userspace;
ENDPROC(_schedule_and_signal_from_int)
Modified: trunk/arch/blackfin/mach-common/interrupt.S (8145 => 8146)
--- trunk/arch/blackfin/mach-common/interrupt.S 2010-01-12 10:58:29 UTC (rev 8145)
+++ trunk/arch/blackfin/mach-common/interrupt.S 2010-01-12 19:20:54 UTC (rev 8146)
@@ -168,13 +168,7 @@
r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
SP += -12;
-#if defined(CONFIG_ROMKERNEL)
- p5.l = _trap_c;
- p5.h = _trap_c;
- call ( p5 );
-#else
- call _trap_c;
-#endif
+ pseudo_long_call _trap_c, p5;
SP += 12;
#ifdef EBIU_ERRMST