All of lore.kernel.org
 help / color / mirror / Atom feed
* get_insn_opcode broken in the 64-bit kernel
@ 2002-10-21  8:05 Carsten Langgaard
  0 siblings, 0 replies; only message in thread
From: Carsten Langgaard @ 2002-10-21  8:05 UTC (permalink / raw)
  To: Ralf Baechle, linux-mips

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

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



[-- Attachment #2: get_insn_opcode.patch --]
[-- Type: text/plain, Size: 727 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-21  8:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-21  8:05 get_insn_opcode broken in the 64-bit kernel Carsten Langgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.