MIPS: unaligned: Fix regular load/store instruction emulation for EVA
authorMarkos Chandras <markos.chandras@imgtec.com>
Mon, 9 Mar 2015 14:54:52 +0000 (14:54 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 10 Apr 2015 13:41:45 +0000 (15:41 +0200)
commit6eae35485b26f9e51ab896eb8a936bed9908fdf6
tree2b0d658ad890bdd012942abd736af3275dbfb72a
parent3563c32d6532ece53c9dd8905a8e41983ef9952f
MIPS: unaligned: Fix regular load/store instruction emulation for EVA

When emulating a regular lh/lw/lhu/sh/sw we need to use the appropriate
instruction if we are in EVA mode. This is necessary for userspace
applications which trigger alignment exceptions. In such case, the
userspace load/store instruction needs to be emulated with the correct
eva/non-eva instruction by the kernel emulator.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Fixes: c1771216ab48 ("MIPS: kernel: unaligned: Handle unaligned accesses for EVA")
Cc: <stable@vger.kernel.org> # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9503/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/unaligned.c