Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1233592
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.2 020/134] MIPS: math-emu: Emulate missing BC1{EQ,NE}Z instructions |
| Date | 2015-09-27 00:30 +0200 |
| Message-ID | <qd68G-4RL-15@gated-at.bofh.it> (permalink) |
| References | <qd4Jz-2Ha-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markos Chandras <markos.chandras@imgtec.com>
commit c909ca718e8f50cf484ef06a8dd935e738e8e53d upstream.
Commit c8a34581ec09 ("MIPS: Emulate the BC1{EQ,NE}Z FPU instructions")
added support for emulating the new R6 BC1{EQ,NE}Z branches but it missed
the case where the instruction that caused the exception was not on a DS.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Fixes: c8a34581ec09 ("MIPS: Emulate the BC1{EQ,NE}Z FPU instructions")
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10738/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/math-emu/cp1emu.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -1181,6 +1181,24 @@ emul:
}
break;
+ case bc1eqz_op:
+ case bc1nez_op:
+ if (!cpu_has_mips_r6 || delay_slot(xcp))
+ return SIGILL;
+
+ cond = likely = 0;
+ switch (MIPSInst_RS(ir)) {
+ case bc1eqz_op:
+ if (get_fpr32(¤t->thread.fpu.fpr[MIPSInst_RT(ir)], 0) & 0x1)
+ cond = 1;
+ break;
+ case bc1nez_op:
+ if (!(get_fpr32(¤t->thread.fpu.fpr[MIPSInst_RT(ir)], 0) & 0x1))
+ cond = 1;
+ break;
+ }
+ goto branch_common;
+
case bc_op:
if (delay_slot(xcp))
return SIGILL;
@@ -1207,7 +1225,7 @@ emul:
case bct_op:
break;
}
-
+branch_common:
set_delay_slot(xcp);
if (cond) {
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.2 000/134] 4.2.2-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 049/134] powerpc/eeh: Probe after unbalanced kref check Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 018/134] MIPS: CPS: use 32b accesses to GCRs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 032/134] arm64: compat: fix vfp save/restore across signal handlers in big-endian Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 047/134] pinctrl: at91: fix null pointer dereference Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 006/134] nfc: st-nci: Remove data from ack_pending_q when receiving a SYNC_ACK Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 015/134] rtlwifi: rtl8821ae: Fix an expression that is always false Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 030/134] of/fdt: make memblock maximum physical address arch configurable Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 035/134] arm/arm64: KVM: vgic: Check for !irqchip_in_kernel() when mapping resources Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 050/134] powerpc/eeh: Fix fenced PHB caused by eeh_slot_error_detail() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 007/134] nfc: st-nci: Free data with irrelevant NDLC PCB_SYNC value Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 017/134] tg3: Fix temperature reporting Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 053/134] powerpc: Uncomment and make enable_kernel_vsx() routine available Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 003/134] nfc: st-nci: Fix non accurate comment for st_nci_i2c_read Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 036/134] KVM: arm64: add workaround for Cortex-A57 erratum #852523 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 004/134] NFC: st21nfca: fix use of uninitialized variables in error path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 037/134] arm64: KVM: Disable virtual timer even if the guest is not using it Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 008/134] nfc: netlink: Add check on NFC_ATTR_VENDOR_DATA Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 048/134] powerpc/pseries: Fix corrupted pdn list Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 059/134] powerpc/mm: Recompute hash value after a failed update Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:20 +0200
[PATCH 4.2 021/134] mac80211: enable assoc check for mesh interfaces Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 029/134] arm64: flush FP/SIMD state correctly after execve() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 019/134] MIPS: math-emu: Allow m{f,t}hc emulation on MIPS R6 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 024/134] cxl: Fix unbalanced pci_dev_get in cxl_probe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 002/134] nfc: st-nci: Fix typo when changing from st21nfcb to st-nci Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 022/134] cxl: Allow release of contexts which have been OPENED but not STARTED Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 027/134] arm64: kconfig: Move LIST_POISON to a safe value Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 020/134] MIPS: math-emu: Emulate missing BC1{EQ,NE}Z instructions Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 025/134] ext4: dont manipulate recovery flag when freezing no-journal fs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 028/134] arm64: entry: always restore x0 from the stack on syscall return Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 010/134] nfc: nci: hci: Add check on skb nci_hci_send_cmd parameter Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 026/134] Revert "ext4: remove block_device_ejected" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
[PATCH 4.2 023/134] cxl: Remove racy attempt to force EEH invocation in reset Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 00:30 +0200
Re: [PATCH 4.2 000/134] 4.2.2-stable review Guenter Roeck <linux@roeck-us.net> - 2015-09-27 20:20 +0200
Re: [PATCH 4.2 000/134] 4.2.2-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-27 20:40 +0200
Re: [PATCH 4.2 000/134] 4.2.2-stable review Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-28 08:00 +0200
Re: [PATCH 4.2 000/134] 4.2.2-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-28 16:30 +0200
Re: [PATCH 4.2 000/134] 4.2.2-stable review Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-28 17:10 +0200
Re: [PATCH 4.2 000/134] 4.2.2-stable review Guenter Roeck <linux@roeck-us.net> - 2015-09-28 17:10 +0200
Re: [PATCH 4.2 000/134] 4.2.2-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-09-28 19:40 +0200
csiph-web