]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs.
authorDavid Daney <ddaney@caviumnetworks.com>
Mon, 2 Nov 2009 19:33:46 +0000 (11:33 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 Nov 2009 17:10:37 +0000 (18:10 +0100)
commitf825bd7515fbfcf3346bc468f05022009816e914
tree6d95ce81145b0a11868dd38f5571f58d9d8a79e6
parentf7813ac205bd669904ff30d54e7343b74d68fd3f
MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs.

Running a 64-bit kernel on a 64-bit CPU without an FPU would cause the
emulator to run in 32-bit mode.  The c0_Status.FR bit is wired to zero
on systems without an FPU, so using that bit to decide how the emulator
behaves doesn't allow for proper emulation on 64-bit FPU-less
processors.

Instead, we need to select the emulator mode based on the user-space
ABI.  Since the thread flag TIF_32BIT_REGS is used to set c0_Status.FR,
we can just use it to decide if the emulator should be in 32-bit or
64-bit mode.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/math-emu/cp1emu.c