Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 2.5] r4k_switch task_struct/thread_info fixes
@ 2003-02-03 22:21 Vivien Chappelier
  2003-02-04 12:54 ` Ralf Baechle
  2003-02-07  0:36 ` Jun Sun
  0 siblings, 2 replies; 5+ messages in thread
From: Vivien Chappelier @ 2003-02-03 22:21 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Jun Sun, linux-mips

Hi,

	This patch fixes an incorrect use of THREAD_FLAGS instead of
TI_FLAGS when clearing the TIF_USEDFPU flag of the current thread info,
and an incorrect assumption when using ST_OFF, that the stack is shared
with task_struct, whereas it is shared with thread_info in 2.5.

Vivien.

Index: arch/mips64/kernel/r4k_switch.S
===================================================================
RCS file: /home/cvs/linux/arch/mips64/kernel/r4k_switch.S,v
retrieving revision 1.22
diff -u -r1.22 r4k_switch.S
--- arch/mips64/kernel/r4k_switch.S	5 Nov 2002 19:51:47 -0000	1.22
+++ arch/mips64/kernel/r4k_switch.S	3 Feb 2003 22:05:26 -0000
@@ -24,6 +24,10 @@
 
 	.set	mips3
 
+/* 
+ * Offset to the current process status flags, the first 32 bytes of the
+ * stack are not used.
+ */
 #define ST_OFF (KERNEL_STACK_SIZE - 32 - PT_SIZE + PT_STATUS)
 
 /*
@@ -58,15 +62,15 @@
 	nor	t1, zero, t1
 
 	and	t0, t0, t1
-	sd	t0, TASK_FLAGS(t3)
+	sd	t0, TI_FLAGS(t3)
 
 	/*
 	 * clear saved user stack CU1 bit
 	 */
-	ld	t0, ST_OFF(a0)
+	ld	t0, ST_OFF(t3)
 	li	t1, ~ST0_CU1
 	and	t0, t0, t1
-	sd	t0, ST_OFF(a0)
+	sd	t0, ST_OFF(t3)
 
 	
 	sll	t2, t0, 5
Index: arch/mips/kernel/r4k_switch.S
===================================================================
RCS file: /home/cvs/linux/arch/mips/kernel/r4k_switch.S,v
retrieving revision 1.29
diff -u -r1.29 r4k_switch.S
--- arch/mips/kernel/r4k_switch.S	5 Nov 2002 19:51:47 -0000	1.29
+++ arch/mips/kernel/r4k_switch.S	3 Feb 2003 22:06:17 -0000
@@ -67,10 +67,10 @@
 	/*
 	 * clear saved user stack CU1 bit
 	 */
-	lw	t0, ST_OFF(a0)
+	lw	t0, ST_OFF(t3)
 	li	t1, ~ST0_CU1
 	and	t0, t0, t1
-	sw	t0, ST_OFF(a0)
+	sw	t0, ST_OFF(t3)
 
 	FPU_SAVE_DOUBLE(a0, t0)			# clobbers t0
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-07 18:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-03 22:21 [PATCH 2.5] r4k_switch task_struct/thread_info fixes Vivien Chappelier
2003-02-04 12:54 ` Ralf Baechle
2003-02-07  0:36 ` Jun Sun
2003-02-07  9:29   ` Vivien Chappelier
2003-02-07 18:40     ` Jun Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox