https://github.com/torvalds/linux
Revision 1a73d9310e093fc3adffba4d0a67b9fab2ee3f63 authored by Paul Burton on 02 June 2017, 18:35:01 UTC, committed by Ralf Baechle on 15 June 2017, 09:47:42 UTC
The code handling the pop76 opcode (ie. bnezc & jialc instructions) in
__compute_return_epc_for_insn() needs to set the value of $31 in the
jialc case, which is encoded with rs = 0. However its check to
differentiate bnezc (rs != 0) from jialc (rs = 0) was unfortunately
backwards, meaning that if we emulate a bnezc instruction we clobber $31
& if we emulate a jialc instruction it actually behaves like a jic
instruction.

Fix this by inverting the check of rs to match the way the instructions
are actually encoded.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: 28d6f93d201d ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC instructions")
Cc: stable <stable@vger.kernel.org> # v4.0+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16178/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 698b851
History
Tip revision: 1a73d9310e093fc3adffba4d0a67b9fab2ee3f63 authored by Paul Burton on 02 June 2017, 18:35:01 UTC
MIPS: Fix bnezc/jialc return address calculation
Tip revision: 1a73d93
File Mode Size
powercap
regulator
00-INDEX -rw-r--r-- 1.4 KB
apm-acpi.txt -rw-r--r-- 1.5 KB
basic-pm-debugging.txt -rw-r--r-- 11.9 KB
charger-manager.txt -rw-r--r-- 9.2 KB
drivers-testing.txt -rw-r--r-- 2.1 KB
freezing-of-tasks.txt -rw-r--r-- 12.0 KB
interface.txt -rw-r--r-- 3.5 KB
opp.txt -rw-r--r-- 13.5 KB
pci.txt -rw-r--r-- 53.7 KB
pm_qos_interface.txt -rw-r--r-- 9.7 KB
power_supply_class.txt -rw-r--r-- 9.1 KB
runtime_pm.txt -rw-r--r-- 44.6 KB
s2ram.txt -rw-r--r-- 3.3 KB
states.txt -rw-r--r-- 6.1 KB
suspend-and-cpuhotplug.txt -rw-r--r-- 12.5 KB
suspend-and-interrupts.txt -rw-r--r-- 7.0 KB
swsusp-and-swap-files.txt -rw-r--r-- 2.7 KB
swsusp-dmcrypt.txt -rw-r--r-- 4.7 KB
swsusp.txt -rw-r--r-- 17.3 KB
tricks.txt -rw-r--r-- 753 bytes
userland-swsusp.txt -rw-r--r-- 8.4 KB
video.txt -rw-r--r-- 8.3 KB

back to top