[parisc-linux-cvs] linux amodra
Alan Modra
alan@linuxcare.com.au
Fri, 23 Feb 2001 18:12:32 +1100 (EST)
On Thu, 22 Feb 2001, Alan Modra wrote:
> Log message:
> Make use of some delay slots.
> Remove special stack frame for schedule_tail call.
Some little tweaks I noticed. I'm 99% sure the stack frame is always
there for schedule_tail, so there's no need for an extra one.
Index: arch/parisc/kernel/entry.S
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/entry.S,v
retrieving revision 1.74
diff -u -p -r1.74 entry.S
--- entry.S 2001/02/23 05:08:19 1.74
+++ entry.S 2001/02/23 06:52:28
@@ -492,10 +492,9 @@ __kernel_thread:
/* Parent Returns here */
- ldo -PT_SZ_ALGN(%r30), %r30
- LDREG -RP_OFFSET(%r30), %r2
+ LDREG -PT_SZ_ALGN-RP_OFFSET(%r30), %r2
bv %r0(%r2)
- nop
+ ldo -PT_SZ_ALGN(%r30), %r30
/*
* Child Returns here
@@ -508,11 +507,9 @@ __kernel_thread:
ret_from_kernel_thread:
/* Call schedule_tail first though */
-
bl schedule_tail, %r2
- ldo 64(%r30), %r30
+ nop
- ldo -64(%r30), %r30
LDREG TASK_PT_GR26-TASK_SZ_ALGN(%r30), %r1
LDREG TASK_PT_GR25-TASK_SZ_ALGN(%r30), %r26
ble 0(%sr7, %r1)
@@ -571,10 +568,8 @@ _switch_to:
LDREG TASK_PT_KPC(%r25), %r2
STREG %r30, TASK_PT_KSP(%r26)
- LDREG TASK_PT_KSP(%r25), %r30
-
bv %r0(%r2)
- nop
+ LDREG TASK_PT_KSP(%r25), %r30
_switch_to_ret:
mtctl %r0, %cr0 /* Needed for single stepping */
@@ -1784,16 +1779,14 @@ wrapper_exit:
/* strace expects syscall # to be preserved in r20 */
ldi __NR_fork,%r20
- STREG %r20,PT_GR20(%r1)
bv %r0(%r2)
- nop
+ STREG %r20,PT_GR20(%r1)
/* Set the return value for the child */
child_return:
bl schedule_tail, %r2
- ldo 64(%r30), %r30
+ nop
- ldo -64(%r30), %r30
LDREG TASK_PT_GR19-TASK_SZ_ALGN-FRAME_SIZE-FRAME_SIZE(%r30),%r2
b wrapper_exit
copy %r0,%r28