Subject: [PATCH] wrong EF_CP0_CAUSE offset

From: Jun Sun <[email-masked]>
Date: Thu, 08 Nov 2001 15:37:00 -0800

reg.h has the wrong offset EF_CP0_CAUSE and the wrong pt_regs size.

This seems to be a problem only for mips (32bit) tree.

Drow found this bug, BTW.

Jun

diff -Nru linux/include/asm-mips/reg.h.orig linux/include/asm-mips/reg.h
--- linux/include/asm-mips/reg.h.orig	Wed Aug 18 16:37:49 1999
+++ linux/include/asm-mips/reg.h	Thu Nov  8 15:23:32 2001
@@ -59,8 +59,8 @@
 #define EF_CP0_EPC		40
 #define EF_CP0_BADVADDR		41
 #define EF_CP0_STATUS		42
-#define EF_CP0_CAUSE		44
+#define EF_CP0_CAUSE		43
 
-#define EF_SIZE			180	/* size in bytes */
+#define EF_SIZE			176	/* size in bytes */
 
 #endif /* __ASM_MIPS_REG_H */

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 9 Nov 2001 18:08:22 +1100

> Drow found this bug, BTW.

Thanks, patch applied to both 2.2 and 2.4.  Fortunately the consequences of
this bug should hardly bite any user.

  Ralf