sparc64: Fix several bugs in quad floating point emulation.
authorDavid S. Miller <davem@davemloft.net>
Fri, 25 May 2012 07:31:56 +0000 (00:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 May 2012 07:31:56 +0000 (00:31 -0700)
commit456d3d42460c1fc20ba0d27442443fcd63aaac35
tree2bdd7021420f845f3c775e91ccc91aa791ef6c45
parent07acfc2a9349a8ce45b236c2624dad452001966b
sparc64: Fix several bugs in quad floating point emulation.

UltraSPARC-T2 and later do not use the fp_exception_other trap and do
not set the floating point trap type field in the %fsr at all when you
try to execute an unimplemented FPU operation.

Instead, it uses the illegal_instruction trap and it leaves the
floating point trap type field clear.

So we should not validate the %fsr trap type field when do_mathemu()
is invoked from the illegal instruction handler.

Also, the floating point trap type field is 3 bits, not 4 bits.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/traps_64.c
arch/sparc/math-emu/math_64.c