linux-mips
[Top] [All Lists]

get_insn_opcode broken in the 64-bit kernel

To: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: get_insn_opcode broken in the 64-bit kernel
From: Carsten Langgaard <carstenl@mips.com>
Date: Mon, 21 Oct 2002 10:05:54 +0200
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
The get_insn_opcode is broken in the 64-bit kernel, the patch below fix
the problem.

/Carsten


--
_    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com


Index: arch/mips64/kernel/traps.c
===================================================================
RCS file: /home/cvs/linux/arch/mips64/kernel/traps.c,v
retrieving revision 1.30.2.33
diff -u -r1.30.2.33 traps.c
--- arch/mips64/kernel/traps.c  2 Oct 2002 14:45:46 -0000       1.30.2.33
+++ arch/mips64/kernel/traps.c  21 Oct 2002 08:03:45 -0000
@@ -463,11 +463,11 @@
 
 static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode)
 {
-       unsigned long *epc;
+       unsigned int *epc;
 
-       epc = (unsigned long *) regs->cp0_epc +
+       epc = (unsigned int *) regs->cp0_epc +
              ((regs->cp0_cause & CAUSEF_BD) != 0);
-       if (!get_user(opcode, epc))
+       if (!get_user(*opcode, epc))
                return 0;
 
        force_sig(SIGSEGV, current);
<Prev in Thread] Current Thread [Next in Thread>
  • get_insn_opcode broken in the 64-bit kernel, Carsten Langgaard <=