[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-mips-cvs
Subject:    MIPS: Fix for warning from FPU emulation code
From:       linux-mips () linux-mips ! org
Date:       2012-08-29 13:44:12
Message-ID: S1903381Ab2H2NoP/20120829134415Z+224 () eddie ! linux-mips ! org
[Download RAW message or body]

Author: Ralf Baechle <ralf@linux-mips.org> Wed Aug 15 19:42:19 2012 +0200
Commit: 7ce1327b68821483ec4c20f8cdd238a87dd943f3
Gitweb: http://git.linux-mips.org/g/ralf/linux/7ce1327b6882
Branch: linux-3.5-stable

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

This problem got introduced in November 2009 by
af1d2af877ef6c36990671bc86a5b9c5bb50b1da (lmo) [MIPS: Fix emulation of
64-bit FPU on 64-bit CPUs.] rsp.  da0bac33413b2888d3623dad3ad19ce76b688f07
(kernel.org) [MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs.]
in 2.6.32.

Fixed by rewriting cop1_64bit() to return a constant whenever possible
but most importantly avoid the use pf cpu_has_fpu entirely.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Jayachandran C <jchandra@broadcom.com>
Initial-patch-by: Jayachandran C <jchandra@broadcom.com>
Patchwork: https://patchwork.linux-mips.org/patch/4225/
(cherry picked from commit 37979004c52fa6968c2946f69a829b12d7e91fe4)

---

 arch/mips/math-emu/cp1emu.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic