linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: macro@linux-mips.org
Date: Wed, 22 Jun 2005 21:43:39 +0100
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     macro@ftp.linux-mips.org        05/06/22 21:43:30

Modified files:
        arch/mips/kernel: traps.c 

Log message:
        Use correct names for bits in the R3k cp0.status register.

diff -urN linux/arch/mips/kernel/traps.c linux/arch/mips/kernel/traps.c
--- linux/arch/mips/kernel/traps.c      2005/06/16 20:39:12     1.216
+++ linux/arch/mips/kernel/traps.c      2005/06/22 20:43:29     1.217
@@ -9,7 +9,7 @@
  * Copyright (C) 1999 Silicon Graphics, Inc.
  * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
  * Copyright (C) 2000, 01 MIPS Technologies, Inc.
- * Copyright (C) 2002, 2003, 2004  Maciej W. Rozycki
+ * Copyright (C) 2002, 2003, 2004, 2005  Maciej W. Rozycki
  */
 #include <linux/config.h>
 #include <linux/init.h>
@@ -203,32 +203,47 @@
 
        printk("Status: %08x    ", (uint32_t) regs->cp0_status);
 
-       if (regs->cp0_status & ST0_KX)
-               printk("KX ");
-       if (regs->cp0_status & ST0_SX)
-               printk("SX ");
-       if (regs->cp0_status & ST0_UX)
-               printk("UX ");
-       switch (regs->cp0_status & ST0_KSU) {
-       case KSU_USER:
-               printk("USER ");
-               break;
-       case KSU_SUPERVISOR:
-               printk("SUPERVISOR ");
-               break;
-       case KSU_KERNEL:
-               printk("KERNEL ");
-               break;
-       default:
-               printk("BAD_MODE ");
-               break;
+       if (current_cpu_data.isa_level == MIPS_CPU_ISA_I) {
+               if (regs->cp0_status & ST0_KUO)
+                       printk("KUo ");
+               if (regs->cp0_status & ST0_IEO)
+                       printk("IEo ");
+               if (regs->cp0_status & ST0_KUP)
+                       printk("KUp ");
+               if (regs->cp0_status & ST0_IEP)
+                       printk("IEp ");
+               if (regs->cp0_status & ST0_KUC)
+                       printk("KUc ");
+               if (regs->cp0_status & ST0_IEC)
+                       printk("IEc ");
+       } else {
+               if (regs->cp0_status & ST0_KX)
+                       printk("KX ");
+               if (regs->cp0_status & ST0_SX)
+                       printk("SX ");
+               if (regs->cp0_status & ST0_UX)
+                       printk("UX ");
+               switch (regs->cp0_status & ST0_KSU) {
+               case KSU_USER:
+                       printk("USER ");
+                       break;
+               case KSU_SUPERVISOR:
+                       printk("SUPERVISOR ");
+                       break;
+               case KSU_KERNEL:
+                       printk("KERNEL ");
+                       break;
+               default:
+                       printk("BAD_MODE ");
+                       break;
+               }
+               if (regs->cp0_status & ST0_ERL)
+                       printk("ERL ");
+               if (regs->cp0_status & ST0_EXL)
+                       printk("EXL ");
+               if (regs->cp0_status & ST0_IE)
+                       printk("IE ");
        }
-       if (regs->cp0_status & ST0_ERL)
-               printk("ERL ");
-       if (regs->cp0_status & ST0_EXL)
-               printk("EXL ");
-       if (regs->cp0_status & ST0_IE)
-               printk("IE ");
        printk("\n");
 
        printk("Cause : %08x\n", cause);

<Prev in Thread] Current Thread [Next in Thread>