aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-10-19 09:33:23 -0400
committerRalf Baechle <ralf@linux-mips.org>2016-11-03 20:01:20 -0400
commit752f5499823edb0c13c594f739363527178f714d (patch)
tree2b8ecc8c0411917b7acd8134b06fe51a27dcce1c /arch/mips/kernel
parent41000c5819ee5aea8c5c3b388e4e21e679c1b95c (diff)
MIPS: Fix __show_regs() output
Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") the output from __show_regs() on MIPS has been pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to provide the appropriate markers & restore the expected register output. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14432/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/traps.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 273b4a419f76..b9a910b208f9 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -262,15 +262,15 @@ static void __show_regs(const struct pt_regs *regs)
262 if ((i % 4) == 0) 262 if ((i % 4) == 0)
263 printk("$%2d :", i); 263 printk("$%2d :", i);
264 if (i == 0) 264 if (i == 0)
265 printk(" %0*lx", field, 0UL); 265 pr_cont(" %0*lx", field, 0UL);
266 else if (i == 26 || i == 27) 266 else if (i == 26 || i == 27)
267 printk(" %*s", field, ""); 267 pr_cont(" %*s", field, "");
268 else 268 else
269 printk(" %0*lx", field, regs->regs[i]); 269 pr_cont(" %0*lx", field, regs->regs[i]);
270 270
271 i++; 271 i++;
272 if ((i % 4) == 0) 272 if ((i % 4) == 0)
273 printk("\n"); 273 pr_cont("\n");
274 } 274 }
275 275
276#ifdef CONFIG_CPU_HAS_SMARTMIPS 276#ifdef CONFIG_CPU_HAS_SMARTMIPS
@@ -291,46 +291,46 @@ static void __show_regs(const struct pt_regs *regs)
291 291
292 if (cpu_has_3kex) { 292 if (cpu_has_3kex) {
293 if (regs->cp0_status & ST0_KUO) 293 if (regs->cp0_status & ST0_KUO)
294 printk("KUo "); 294 pr_cont("KUo ");
295 if (regs->cp0_status & ST0_IEO) 295 if (regs->cp0_status & ST0_IEO)
296 printk("IEo "); 296 pr_cont("IEo ");
297 if (regs->cp0_status & ST0_KUP) 297 if (regs->cp0_status & ST0_KUP)
298 printk("KUp "); 298 pr_cont("KUp ");
299 if (regs->cp0_status & ST0_IEP) 299 if (regs->cp0_status & ST0_IEP)
300 printk("IEp "); 300 pr_cont("IEp ");
301 if (regs->cp0_status & ST0_KUC) 301 if (regs->cp0_status & ST0_KUC)
302 printk("KUc "); 302 pr_cont("KUc ");
303 if (regs->cp0_status & ST0_IEC) 303 if (regs->cp0_status & ST0_IEC)
304 printk("IEc "); 304 pr_cont("IEc ");
305 } else if (cpu_has_4kex) { 305 } else if (cpu_has_4kex) {
306 if (regs->cp0_status & ST0_KX) 306 if (regs->cp0_status & ST0_KX)
307 printk("KX "); 307 pr_cont("KX ");
308 if (regs->cp0_status & ST0_SX) 308 if (regs->cp0_status & ST0_SX)
309 printk("SX "); 309 pr_cont("SX ");
310 if (regs->cp0_status & ST0_UX) 310 if (regs->cp0_status & ST0_UX)
311 printk("UX "); 311 pr_cont("UX ");
312 switch (regs->cp0_status & ST0_KSU) { 312 switch (regs->cp0_status & ST0_KSU) {
313 case KSU_USER: 313 case KSU_USER:
314 printk("USER "); 314 pr_cont("USER ");
315 break; 315 break;
316 case KSU_SUPERVISOR: 316 case KSU_SUPERVISOR:
317 printk("SUPERVISOR "); 317 pr_cont("SUPERVISOR ");
318 break; 318 break;
319 case KSU_KERNEL: 319 case KSU_KERNEL:
320 printk("KERNEL "); 320 pr_cont("KERNEL ");
321 break; 321 break;
322 default: 322 default:
323 printk("BAD_MODE "); 323 pr_cont("BAD_MODE ");
324 break; 324 break;
325 } 325 }
326 if (regs->cp0_status & ST0_ERL) 326 if (regs->cp0_status & ST0_ERL)
327 printk("ERL "); 327 pr_cont("ERL ");
328 if (regs->cp0_status & ST0_EXL) 328 if (regs->cp0_status & ST0_EXL)
329 printk("EXL "); 329 pr_cont("EXL ");
330 if (regs->cp0_status & ST0_IE) 330 if (regs->cp0_status & ST0_IE)
331 printk("IE "); 331 pr_cont("IE ");
332 } 332 }
333 printk("\n"); 333 pr_cont("\n");
334 334
335 exccode = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE; 335 exccode = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE;
336 printk("Cause : %08x (ExcCode %02x)\n", cause, exccode); 336 printk("Cause : %08x (ExcCode %02x)\n", cause, exccode);