get_insn_opcode broken in the 64-bit kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux