android_kernel_samsung_univ.../arch/mips
Aleksandar Markovic 9c631278a9 MIPS: math-emu: Fix final emulation phase for certain instructions
commit 409fcace9963c1e8d2cb0f7ac62e8b34d47ef979 upstream.

Fix final phase of <CLASS|MADDF|MSUBF|MAX|MIN|MAXA|MINA>.<D|S>
emulation. Provide proper generation of SIGFPE signal and updating
debugfs FP exception stats in cases of any exception flags set in
preceding phases of emulation.

CLASS.<D|S> instruction may generate "Unimplemented Operation" FP
exception. <MADDF|MSUBF>.<D|S> instructions may generate "Inexact",
"Unimplemented Operation", "Invalid Operation", "Overflow", and
"Underflow" FP exceptions. <MAX|MIN|MAXA|MINA>.<D|S> instructions
can generate "Unimplemented Operation" and "Invalid Operation" FP
exceptions.

The proper final processing of the cases when any FP exception
flag is set is achieved by replacing "break" statement with "goto
copcsr" statement. With such solution, this patch brings the final
phase of emulation of the above instructions consistent with the
one corresponding to the previously implemented emulation of other
related FPU instructions (ADD, SUB, etc.).

Fixes: 38db37ba06 ("MIPS: math-emu: Add support for the MIPS R6 CLASS FPU instruction")
Fixes: e24c3bec3e ("MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction")
Fixes: 83d43305a1 ("MIPS: math-emu: Add support for the MIPS R6 MSUBF FPU instruction")
Fixes: a79f5f9ba5 ("MIPS: math-emu: Add support for the MIPS R6 MAX{, A} FPU instruction")
Fixes: 4e9561b20e ("MIPS: math-emu: Add support for the MIPS R6 MIN{, A} FPU instruction")
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Douglas Leung <douglas.leung@mips.com>
Cc: Goran Ferenc <goran.ferenc@mips.com>
Cc: "Maciej W. Rozycki" <macro@imgtec.com>
Cc: Miodrag Dinic <miodrag.dinic@mips.com>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petar Jovanovic <petar.jovanovic@mips.com>
Cc: Raghu Gandham <raghu.gandham@mips.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17581/
Signed-off-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-25 14:22:15 +01:00
..
alchemy pcmcia: db1xxx_ss: fix last irq_to_gpio user 2016-04-20 15:42:09 +09:00
ar7 MIPS: AR7: Ensure that serial ports are properly set up 2017-11-15 17:13:13 +01:00
ath25
ath79 MIPS: ath79: fix regression in PCI window initialization 2017-07-05 14:37:17 +02:00
bcm47xx MIPS: BCM47XX: Fix LED inversion for WRT54GSv1 2017-11-30 08:37:20 +00:00
bcm63xx
bmips
boot
cavium-octeon MIPS: OCTEON: Fix copy_from_user fault handling for large buffers 2017-03-12 06:37:23 +01:00
cobalt
configs MIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change 2017-03-18 19:09:56 +08:00
dec MIPS: DEC: Avoid la pseudo-instruction in delay slots 2017-03-18 19:09:57 +08:00
emma
fw
include MIPS: End asm function prologue macros with .insn 2017-11-21 09:21:22 +01:00
jazz
jz4740
kernel MIPS: Fix an n32 core file generation regset support regression 2017-11-30 08:37:20 +00:00
kvm KVM: MIPS: Flush KVM entry code from icache globally 2017-01-12 11:22:43 +01:00
lantiq MIPS: Lantiq: Fix another request_mem_region() return code check 2017-10-08 10:14:18 +02:00
lasat
lib MIPS: lib: Mark intrinsics notrace 2016-06-07 18:14:32 -07:00
loongson32
loongson64 MIPS: hpet: Increase HPET_MIN_PROG_DELTA and decrease HPET_MIN_CYCLES 2016-08-20 18:09:27 +02:00
math-emu MIPS: math-emu: Fix final emulation phase for certain instructions 2017-12-25 14:22:15 +01:00
mm MIPS: microMIPS: Fix incorrect mask in insn_table_MM 2017-11-15 17:13:12 +01:00
mti-malta MIPS: Malta: Fix IOCU disable switch read for MIPS64 2016-10-07 15:23:43 +02:00
mti-sead3
net net: filter: make JITs zero A for SKF_AD_ALU_XOR_X 2016-01-06 00:43:52 -05:00
netlogic MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds 2017-11-21 09:21:22 +01:00
oprofile
paravirt
pci MIPS: Fix build error due to unused variables. 2015-12-22 15:21:18 +01:00
pistachio
pmcs-msp71xx MIPS: Fix build error due to unused variables. 2015-12-22 15:21:18 +01:00
pnx833x
power
ralink MIPS: ralink: Fix typo in mt7628 pinmux function 2017-11-30 08:37:19 +00:00
rb532
sgi-ip22 MIPS: ip22: Fix ip28 build for modern gcc 2017-03-18 19:09:56 +08:00
sgi-ip27
sgi-ip32
sibyte
sni MIPS: Fix build error due to unused variables. 2015-12-22 15:21:18 +01:00
txx9
vdso MIPS: Fix -mabi=64 build of vdso.lds 2016-10-28 03:01:30 -04:00
vr41xx
xilfpga
Kbuild
Kbuild.platforms
Kconfig MIPS: fix Select HAVE_IRQ_EXIT_ON_IRQ_STACK patch. 2017-04-21 09:30:08 +02:00
Kconfig.debug MIPS: Remove compact branch policy Kconfig entries 2016-09-30 10:18:39 +02:00
Makefile MIPS: Remove compact branch policy Kconfig entries 2016-09-30 10:18:39 +02:00