diff options
-rw-r--r-- | arch/mips/kernel/traps.c | 67 |
1 files changed, 41 insertions, 26 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index b502dc970b35..46636a2fe982 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * Copyright (C) 1999 Silicon Graphics, Inc. | 9 | * Copyright (C) 1999 Silicon Graphics, Inc. |
10 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com | 10 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com |
11 | * Copyright (C) 2000, 01 MIPS Technologies, Inc. | 11 | * Copyright (C) 2000, 01 MIPS Technologies, Inc. |
12 | * Copyright (C) 2002, 2003, 2004 Maciej W. Rozycki | 12 | * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki |
13 | */ | 13 | */ |
14 | #include <linux/config.h> | 14 | #include <linux/config.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
@@ -203,32 +203,47 @@ void show_regs(struct pt_regs *regs) | |||
203 | 203 | ||
204 | printk("Status: %08x ", (uint32_t) regs->cp0_status); | 204 | printk("Status: %08x ", (uint32_t) regs->cp0_status); |
205 | 205 | ||
206 | if (regs->cp0_status & ST0_KX) | 206 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_I) { |
207 | printk("KX "); | 207 | if (regs->cp0_status & ST0_KUO) |
208 | if (regs->cp0_status & ST0_SX) | 208 | printk("KUo "); |
209 | printk("SX "); | 209 | if (regs->cp0_status & ST0_IEO) |
210 | if (regs->cp0_status & ST0_UX) | 210 | printk("IEo "); |
211 | printk("UX "); | 211 | if (regs->cp0_status & ST0_KUP) |
212 | switch (regs->cp0_status & ST0_KSU) { | 212 | printk("KUp "); |
213 | case KSU_USER: | 213 | if (regs->cp0_status & ST0_IEP) |
214 | printk("USER "); | 214 | printk("IEp "); |
215 | break; | 215 | if (regs->cp0_status & ST0_KUC) |
216 | case KSU_SUPERVISOR: | 216 | printk("KUc "); |
217 | printk("SUPERVISOR "); | 217 | if (regs->cp0_status & ST0_IEC) |
218 | break; | 218 | printk("IEc "); |
219 | case KSU_KERNEL: | 219 | } else { |
220 | printk("KERNEL "); | 220 | if (regs->cp0_status & ST0_KX) |
221 | break; | 221 | printk("KX "); |
222 | default: | 222 | if (regs->cp0_status & ST0_SX) |
223 | printk("BAD_MODE "); | 223 | printk("SX "); |
224 | break; | 224 | if (regs->cp0_status & ST0_UX) |
225 | printk("UX "); | ||
226 | switch (regs->cp0_status & ST0_KSU) { | ||
227 | case KSU_USER: | ||
228 | printk("USER "); | ||
229 | break; | ||
230 | case KSU_SUPERVISOR: | ||
231 | printk("SUPERVISOR "); | ||
232 | break; | ||
233 | case KSU_KERNEL: | ||
234 | printk("KERNEL "); | ||
235 | break; | ||
236 | default: | ||
237 | printk("BAD_MODE "); | ||
238 | break; | ||
239 | } | ||
240 | if (regs->cp0_status & ST0_ERL) | ||
241 | printk("ERL "); | ||
242 | if (regs->cp0_status & ST0_EXL) | ||
243 | printk("EXL "); | ||
244 | if (regs->cp0_status & ST0_IE) | ||
245 | printk("IE "); | ||
225 | } | 246 | } |
226 | if (regs->cp0_status & ST0_ERL) | ||
227 | printk("ERL "); | ||
228 | if (regs->cp0_status & ST0_EXL) | ||
229 | printk("EXL "); | ||
230 | if (regs->cp0_status & ST0_IE) | ||
231 | printk("IE "); | ||
232 | printk("\n"); | 247 | printk("\n"); |
233 | 248 | ||
234 | printk("Cause : %08x\n", cause); | 249 | printk("Cause : %08x\n", cause); |