sdc1 $f0 in r4k_switch.S

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I found a bug in resume() in 2.6 kernel.  $f0 register may not be
saved on context switch in 64bit kernel.  Here is a quick fix.

Or moving "sdc1 $f0" to fpu_save_16even might be better fix.

diff -u linux-mips/arch/mips/kernel/r4k_switch.S linux/arch/mips/kernel/r4k_switch.S
--- linux-mips/arch/mips/kernel/r4k_switch.S	1 Sep 2004 08:03:31 -0000	1.11
+++ linux/arch/mips/kernel/r4k_switch.S	7 Oct 2004 03:27:56 -0000
@@ -81,10 +81,10 @@
 #ifdef CONFIG_MIPS64
 	sll	t2, t0, 5
 	bgez	t2, 2f
-	sdc1	$f0, (THREAD_FPU + 0x00)(a0)
         fpu_save_16odd a0
 2:
         fpu_save_16even a0 t1                   # clobbers t1
+	sdc1	$f0, (THREAD_FPU + 0x00)(a0)
 #endif
 1:
 

---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux