[PATCH] MIPS: Fix for warning from FPU emulation code

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

 



The default implementation of 'cpu_has_fpu' macro calls
smp_processor_id() which causes this warning to be printed when
preemption is enabled:

[    4.664000] Algorithmics/MIPS FPU Emulator v1.5
[    4.676000] BUG: using smp_processor_id() in preemptible [00000000] code: ini
[    4.700000] caller is fpu_emulator_cop1Handler+0x434/0x27b8

Use 'raw_cpu_has_fpu' macro in cop1_64bit() instead of 'cpu_has_fpu'
to fix this. Fix suggested by Ralf Baechle <ralf@xxxxxxxxxxxxxx>

Signed-off-by: Jayachandran C <jchandra@xxxxxxxxxxxx>
---
 arch/mips/math-emu/cp1emu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index a03bf00..663bfb9 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -178,7 +178,7 @@ static int isBranchInstr(mips_instruction * i)
  */
 static inline int cop1_64bit(struct pt_regs *xcp)
 {
-	if (cpu_has_fpu)
+	if (raw_cpu_has_fpu)
 		return xcp->cp0_status & ST0_FR;
 #ifdef CONFIG_64BIT
 	return !test_thread_flag(TIF_32BIT_REGS);
-- 
1.7.9.5





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

  Powered by Linux