[parisc-linux-cvs] linux-2.6 tausq

Randolph Chung randolph at tausq.org
Fri Oct 29 00:35:08 MDT 2004


> Modified files:
> 	arch/parisc/kernel: head.S 
> 
> Log message:
> cleanup 64-bit sp manipulations

consolidate some of the #ifdef __LP64__ code...

Index: arch/parisc/kernel/head.S
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/head.S,v
retrieving revision 1.9
diff -u -p -r1.9 head.S
--- arch/parisc/kernel/head.S	8 Sep 2004 15:06:48 -0000	1.9
+++ arch/parisc/kernel/head.S	29 Oct 2004 06:31:05 -0000
@@ -133,21 +133,11 @@ $pgt_fill_loop:
 
 	/* And the stack pointer too */
 	ldo             THREAD_SZ_ALGN(%r6),%sp
-#ifdef __LP64__
-	tophys_r1	%sp
-#endif
 
 	/* And the interrupt stack */
 	load32		interrupt_stack,%r6
 	mtctl           %r6,%cr31
 
-#ifdef __LP64__
-#define MEM_PDC_LO 0x388
-#define MEM_PDC_HI 0x35C
-	ldw             MEM_PDC_LO(%r0),%r3
-	ldw             MEM_PDC_HI(%r0),%r6
-	depd            %r6, 31, 32, %r3        /* move to upper word */
-#endif
 #ifdef CONFIG_SMP
 	/* Set the smp rendevous address into page zero.
 	** It would be safer to do this in init_smp_config() but
@@ -186,6 +176,8 @@ common_stext:
 #endif /*CONFIG_SMP*/
 
 #ifdef __LP64__
+	tophys_r1	%sp
+
 	/* Save the rfi target address */
 	ldd             TI_TASK-THREAD_SZ_ALGN(%sp), %r10
 	tophys_r1       %r10
@@ -204,6 +196,12 @@ common_stext:
         ** Someday, palo might not do this for the Monarch either.
         */
 2:
+#define MEM_PDC_LO 0x388
+#define MEM_PDC_HI 0x35C
+	ldw             MEM_PDC_LO(%r0),%r3
+	ldw             MEM_PDC_HI(%r0),%r6
+	depd            %r6, 31, 32, %r3        /* move to upper word */
+
 	ldo             PDC_PSW(%r0),%arg0              /* 21 */
 	ldo             PDC_PSW_SET_DEFAULTS(%r0),%arg1 /* 2 */
 	ldo             PDC_PSW_WIDE_BIT(%r0),%arg2     /* 2 */
@@ -216,6 +214,7 @@ stext_pdc_ret:
 	ldd             TI_TASK-THREAD_SZ_ALGN(%sp), %r10
 	tophys_r1       %r10
 	ldd             TASK_PT_GR11(%r10), %r11
+	tovirt_r1       %sp
 #endif
 	
 	/* PARANOID: clear user scratch/user space SR's */
@@ -230,11 +229,8 @@ stext_pdc_ret:
 	mtctl	%r0,%cr12
 	mtctl	%r0,%cr13
 
-#ifdef __LP64__
 	/* Prepare to RFI! Man all the cannons! */
-	tovirt_r1       %sp
-#endif
-	
+
 	/* Initialize the global data pointer */
 	loadgp
 
@@ -359,9 +355,6 @@ smp_slave_stext:
 	LDREG		TASK_THREAD_INFO(%sp),%sp
 	mtctl           %sp,%cr30       /* store in cr30 */
 	ldo             THREAD_SZ_ALGN(%sp),%sp
-#ifdef __LP64__
-	tophys_r1       %sp
-#endif
 
 	/* point CPU to kernel page tables */
 	load32		PA(swapper_pg_dir),%r4
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/


More information about the parisc-linux-cvs mailing list