diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2016-01-22 00:20:37 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-01-23 19:35:26 -0500 |
commit | a87265cfedce49fa362030ae3e6ef047e08bc12c (patch) | |
tree | da229b62d78407a8eb5abd81f2a1775623edd2e6 | |
parent | e4553573b37c3f72533683cb5f3a1ad300b18d37 (diff) |
MIPS: math-emu: dsemul: Fix ill formatting of microMIPS part
Correct formatting breakage introduced with commit 102cedc32a6e ("MIPS:
microMIPS: Floating point support."), so that further changes to this
code can be consistent.
Signed-off-by: Maciej W. Rozycki <macro@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12173/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/math-emu/dsemul.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c index 70e4824c64dc..4e30bfc3cdd5 100644 --- a/arch/mips/math-emu/dsemul.c +++ b/arch/mips/math-emu/dsemul.c | |||
@@ -75,10 +75,14 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc) | |||
75 | return SIGBUS; | 75 | return SIGBUS; |
76 | 76 | ||
77 | if (get_isa16_mode(regs->cp0_epc)) { | 77 | if (get_isa16_mode(regs->cp0_epc)) { |
78 | err = __put_user(ir >> 16, (u16 __user *)(&fr->emul)); | 78 | err = __put_user(ir >> 16, |
79 | err |= __put_user(ir & 0xffff, (u16 __user *)((long)(&fr->emul) + 2)); | 79 | (u16 __user *)(&fr->emul)); |
80 | err |= __put_user(BREAK_MATH >> 16, (u16 __user *)(&fr->badinst)); | 80 | err |= __put_user(ir & 0xffff, |
81 | err |= __put_user(BREAK_MATH & 0xffff, (u16 __user *)((long)(&fr->badinst) + 2)); | 81 | (u16 __user *)((long)(&fr->emul) + 2)); |
82 | err |= __put_user(BREAK_MATH >> 16, | ||
83 | (u16 __user *)(&fr->badinst)); | ||
84 | err |= __put_user(BREAK_MATH & 0xffff, | ||
85 | (u16 __user *)((long)(&fr->badinst) + 2)); | ||
82 | } else { | 86 | } else { |
83 | err = __put_user(ir, &fr->emul); | 87 | err = __put_user(ir, &fr->emul); |
84 | err |= __put_user((mips_instruction)BREAK_MATH, &fr->badinst); | 88 | err |= __put_user((mips_instruction)BREAK_MATH, &fr->badinst); |
@@ -125,8 +129,10 @@ int do_dsemulret(struct pt_regs *xcp) | |||
125 | * - Is the following memory word the BD_COOKIE? | 129 | * - Is the following memory word the BD_COOKIE? |
126 | */ | 130 | */ |
127 | if (get_isa16_mode(xcp->cp0_epc)) { | 131 | if (get_isa16_mode(xcp->cp0_epc)) { |
128 | err = __get_user(instr[0], (u16 __user *)(&fr->badinst)); | 132 | err = __get_user(instr[0], |
129 | err |= __get_user(instr[1], (u16 __user *)((long)(&fr->badinst) + 2)); | 133 | (u16 __user *)(&fr->badinst)); |
134 | err |= __get_user(instr[1], | ||
135 | (u16 __user *)((long)(&fr->badinst) + 2)); | ||
130 | insn = (instr[0] << 16) | instr[1]; | 136 | insn = (instr[0] << 16) | instr[1]; |
131 | } else { | 137 | } else { |
132 | err = __get_user(insn, &fr->badinst); | 138 | err = __get_user(insn, &fr->badinst); |