get_insn_opcode broken in the 64-bit kernel
The get_insn_opcode is broken in the 64-bit kernel, the patch below fix the problem.
/Carsten
--
_ _ ____ ___ Carsten Langgaard Mailto:[email protected] |\ /|||___)(___ 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
mips64/kernel/traps.c +3 -3
@@ -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);