Commit 245b815c3faf4a0509948618c35f993160e193a9

Authored by Geert Uytterhoeven
1 parent 8e398f6381

m68k: Convert arch/m68k/kernel/traps.c to pr_*()

Also fix a few printf-style formats, to get rid of the following compiler
warnings when DEBUG is enabled:

arch/m68k/kernel/traps.c: In function ‘access_error060’:
arch/m68k/kernel/traps.c:166: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’
arch/m68k/kernel/traps.c: In function ‘bus_error030’:
arch/m68k/kernel/traps.c:568: warning: format ‘%#lx’ expects type ‘long unsigned int’, but argument 2 has type ‘void *’
arch/m68k/kernel/traps.c:682: warning: format ‘%#lx’ expects type ‘long unsigned int’, but argument 2 has type ‘void *’

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Showing 1 changed file with 101 additions and 131 deletions Side-by-side Diff

arch/m68k/kernel/traps.c
... ... @@ -133,9 +133,7 @@
133 133 {
134 134 unsigned long fslw = fp->un.fmt4.pc; /* is really FSLW for access error */
135 135  
136   -#ifdef DEBUG
137   - printk("fslw=%#lx, fa=%#lx\n", fslw, fp->un.fmt4.effaddr);
138   -#endif
  136 + pr_debug("fslw=%#lx, fa=%#lx\n", fslw, fp->un.fmt4.effaddr);
139 137  
140 138 if (fslw & MMU060_BPE) {
141 139 /* branch prediction error -> clear branch cache */
... ... @@ -162,9 +160,7 @@
162 160 }
163 161 if (fslw & MMU060_W)
164 162 errorcode |= 2;
165   -#ifdef DEBUG
166   - printk("errorcode = %d\n", errorcode );
167   -#endif
  163 + pr_debug("errorcode = %ld\n", errorcode);
168 164 do_page_fault(&fp->ptregs, addr, errorcode);
169 165 } else if (fslw & (MMU060_SEE)){
170 166 /* Software Emulation Error.
... ... @@ -173,8 +169,9 @@
173 169 send_fault_sig(&fp->ptregs);
174 170 } else if (!(fslw & (MMU060_RE|MMU060_WE)) ||
175 171 send_fault_sig(&fp->ptregs) > 0) {
176   - printk("pc=%#lx, fa=%#lx\n", fp->ptregs.pc, fp->un.fmt4.effaddr);
177   - printk( "68060 access error, fslw=%lx\n", fslw );
  172 + pr_err("pc=%#lx, fa=%#lx\n", fp->ptregs.pc,
  173 + fp->un.fmt4.effaddr);
  174 + pr_err("68060 access error, fslw=%lx\n", fslw);
178 175 trap_c( fp );
179 176 }
180 177 }
... ... @@ -225,9 +222,7 @@
225 222 set_fs(old_fs);
226 223  
227 224  
228   -#ifdef DEBUG
229   - printk("do_040writeback1, res=%d\n",res);
230   -#endif
  225 + pr_debug("do_040writeback1, res=%d\n", res);
231 226  
232 227 return res;
233 228 }
... ... @@ -249,7 +244,7 @@
249 244 int res = 0;
250 245 #if 0
251 246 if (fp->un.fmt7.wb1s & WBV_040)
252   - printk("access_error040: cannot handle 1st writeback. oops.\n");
  247 + pr_err("access_error040: cannot handle 1st writeback. oops.\n");
253 248 #endif
254 249  
255 250 if ((fp->un.fmt7.wb2s & WBV_040) &&
256 251  
257 252  
... ... @@ -302,14 +297,12 @@
302 297 unsigned short ssw = fp->un.fmt7.ssw;
303 298 unsigned long mmusr;
304 299  
305   -#ifdef DEBUG
306   - printk("ssw=%#x, fa=%#lx\n", ssw, fp->un.fmt7.faddr);
307   - printk("wb1s=%#x, wb2s=%#x, wb3s=%#x\n", fp->un.fmt7.wb1s,
  300 + pr_debug("ssw=%#x, fa=%#lx\n", ssw, fp->un.fmt7.faddr);
  301 + pr_debug("wb1s=%#x, wb2s=%#x, wb3s=%#x\n", fp->un.fmt7.wb1s,
308 302 fp->un.fmt7.wb2s, fp->un.fmt7.wb3s);
309   - printk ("wb2a=%lx, wb3a=%lx, wb2d=%lx, wb3d=%lx\n",
  303 + pr_debug("wb2a=%lx, wb3a=%lx, wb2d=%lx, wb3d=%lx\n",
310 304 fp->un.fmt7.wb2a, fp->un.fmt7.wb3a,
311 305 fp->un.fmt7.wb2d, fp->un.fmt7.wb3d);
312   -#endif
313 306  
314 307 if (ssw & ATC_040) {
315 308 unsigned long addr = fp->un.fmt7.faddr;
... ... @@ -324,9 +317,7 @@
324 317  
325 318 /* MMU error, get the MMUSR info for this access */
326 319 mmusr = probe040(!(ssw & RW_040), addr, ssw);
327   -#ifdef DEBUG
328   - printk("mmusr = %lx\n", mmusr);
329   -#endif
  320 + pr_debug("mmusr = %lx\n", mmusr);
330 321 errorcode = 1;
331 322 if (!(mmusr & MMU_R_040)) {
332 323 /* clear the invalid atc entry */
333 324  
... ... @@ -340,14 +331,10 @@
340 331 errorcode |= 2;
341 332  
342 333 if (do_page_fault(&fp->ptregs, addr, errorcode)) {
343   -#ifdef DEBUG
344   - printk("do_page_fault() !=0\n");
345   -#endif
  334 + pr_debug("do_page_fault() !=0\n");
346 335 if (user_mode(&fp->ptregs)){
347 336 /* delay writebacks after signal delivery */
348   -#ifdef DEBUG
349   - printk(".. was usermode - return\n");
350   -#endif
  337 + pr_debug(".. was usermode - return\n");
351 338 return;
352 339 }
353 340 /* disable writeback into user space from kernel
... ... @@ -355,9 +342,7 @@
355 342 * the writeback won't do good)
356 343 */
357 344 disable_wb:
358   -#ifdef DEBUG
359   - printk(".. disabling wb2\n");
360   -#endif
  345 + pr_debug(".. disabling wb2\n");
361 346 if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr)
362 347 fp->un.fmt7.wb2s &= ~WBV_040;
363 348 if (fp->un.fmt7.wb3a == fp->un.fmt7.faddr)
... ... @@ -371,7 +356,7 @@
371 356 current->thread.signo = SIGBUS;
372 357 current->thread.faddr = fp->un.fmt7.faddr;
373 358 if (send_fault_sig(&fp->ptregs) >= 0)
374   - printk("68040 bus error (ssw=%x, faddr=%lx)\n", ssw,
  359 + pr_err("68040 bus error (ssw=%x, faddr=%lx)\n", ssw,
375 360 fp->un.fmt7.faddr);
376 361 goto disable_wb;
377 362 }
378 363  
379 364  
380 365  
... ... @@ -394,19 +379,17 @@
394 379 unsigned short ssw = fp->un.fmtb.ssw;
395 380 extern unsigned long _sun3_map_test_start, _sun3_map_test_end;
396 381  
397   -#ifdef DEBUG
398 382 if (ssw & (FC | FB))
399   - printk ("Instruction fault at %#010lx\n",
  383 + pr_debug("Instruction fault at %#010lx\n",
400 384 ssw & FC ?
401 385 fp->ptregs.format == 0xa ? fp->ptregs.pc + 2 : fp->un.fmtb.baddr - 2
402 386 :
403 387 fp->ptregs.format == 0xa ? fp->ptregs.pc + 4 : fp->un.fmtb.baddr);
404 388 if (ssw & DF)
405   - printk ("Data %s fault at %#010lx in %s (pc=%#lx)\n",
  389 + pr_debug("Data %s fault at %#010lx in %s (pc=%#lx)\n",
406 390 ssw & RW ? "read" : "write",
407 391 fp->un.fmtb.daddr,
408 392 space_names[ssw & DFC], fp->ptregs.pc);
409   -#endif
410 393  
411 394 /*
412 395 * Check if this page should be demand-mapped. This needs to go before
... ... @@ -429,7 +412,7 @@
429 412 return;
430 413 /* instruction fault or kernel data fault! */
431 414 if (ssw & (FC | FB))
432   - printk ("Instruction fault at %#010lx\n",
  415 + pr_err("Instruction fault at %#010lx\n",
433 416 fp->ptregs.pc);
434 417 if (ssw & DF) {
435 418 /* was this fault incurred testing bus mappings? */
436 419  
... ... @@ -439,12 +422,12 @@
439 422 return;
440 423 }
441 424  
442   - printk ("Data %s fault at %#010lx in %s (pc=%#lx)\n",
  425 + pr_err("Data %s fault at %#010lx in %s (pc=%#lx)\n",
443 426 ssw & RW ? "read" : "write",
444 427 fp->un.fmtb.daddr,
445 428 space_names[ssw & DFC], fp->ptregs.pc);
446 429 }
447   - printk ("BAD KERNEL BUSERR\n");
  430 + pr_err("BAD KERNEL BUSERR\n");
448 431  
449 432 die_if_kernel("Oops", &fp->ptregs,0);
450 433 force_sig(SIGKILL, current);
... ... @@ -473,12 +456,11 @@
473 456 else if (buserr_type & SUN3_BUSERR_INVALID)
474 457 errorcode = 0x00;
475 458 else {
476   -#ifdef DEBUG
477   - printk ("*** unexpected busfault type=%#04x\n", buserr_type);
478   - printk ("invalid %s access at %#lx from pc %#lx\n",
479   - !(ssw & RW) ? "write" : "read", addr,
480   - fp->ptregs.pc);
481   -#endif
  459 + pr_debug("*** unexpected busfault type=%#04x\n",
  460 + buserr_type);
  461 + pr_debug("invalid %s access at %#lx from pc %#lx\n",
  462 + !(ssw & RW) ? "write" : "read", addr,
  463 + fp->ptregs.pc);
482 464 die_if_kernel ("Oops", &fp->ptregs, buserr_type);
483 465 force_sig (SIGBUS, current);
484 466 return;
... ... @@ -509,9 +491,7 @@
509 491 if (!mmu_emu_handle_fault(addr, 1, 0))
510 492 do_page_fault (&fp->ptregs, addr, 0);
511 493 } else {
512   -#ifdef DEBUG
513   - printk ("protection fault on insn access (segv).\n");
514   -#endif
  494 + pr_debug("protection fault on insn access (segv).\n");
515 495 force_sig (SIGSEGV, current);
516 496 }
517 497 }
518 498  
519 499  
520 500  
521 501  
... ... @@ -525,22 +505,22 @@
525 505 unsigned short ssw = fp->un.fmtb.ssw;
526 506 #ifdef DEBUG
527 507 unsigned long desc;
  508 +#endif
528 509  
529   - printk ("pid = %x ", current->pid);
530   - printk ("SSW=%#06x ", ssw);
  510 + pr_debug("pid = %x ", current->pid);
  511 + pr_debug("SSW=%#06x ", ssw);
531 512  
532 513 if (ssw & (FC | FB))
533   - printk ("Instruction fault at %#010lx\n",
  514 + pr_debug("Instruction fault at %#010lx\n",
534 515 ssw & FC ?
535 516 fp->ptregs.format == 0xa ? fp->ptregs.pc + 2 : fp->un.fmtb.baddr - 2
536 517 :
537 518 fp->ptregs.format == 0xa ? fp->ptregs.pc + 4 : fp->un.fmtb.baddr);
538 519 if (ssw & DF)
539   - printk ("Data %s fault at %#010lx in %s (pc=%#lx)\n",
  520 + pr_debug("Data %s fault at %#010lx in %s (pc=%#lx)\n",
540 521 ssw & RW ? "read" : "write",
541 522 fp->un.fmtb.daddr,
542 523 space_names[ssw & DFC], fp->ptregs.pc);
543   -#endif
544 524  
545 525 /* ++andreas: If a data fault and an instruction fault happen
546 526 at the same time map in both pages. */
547 527  
548 528  
... ... @@ -554,27 +534,23 @@
554 534 "pmove %%psr,%1"
555 535 : "=a&" (desc), "=m" (temp)
556 536 : "a" (addr), "d" (ssw));
  537 + pr_debug("mmusr is %#x for addr %#lx in task %p\n",
  538 + temp, addr, current);
  539 + pr_debug("descriptor address is 0x%p, contents %#lx\n",
  540 + __va(desc), *(unsigned long *)__va(desc));
557 541 #else
558 542 asm volatile ("ptestr %2,%1@,#7\n\t"
559 543 "pmove %%psr,%0"
560 544 : "=m" (temp) : "a" (addr), "d" (ssw));
561 545 #endif
562 546 mmusr = temp;
563   -
564   -#ifdef DEBUG
565   - printk("mmusr is %#x for addr %#lx in task %p\n",
566   - mmusr, addr, current);
567   - printk("descriptor address is %#lx, contents %#lx\n",
568   - __va(desc), *(unsigned long *)__va(desc));
569   -#endif
570   -
571 547 errorcode = (mmusr & MMU_I) ? 0 : 1;
572 548 if (!(ssw & RW) || (ssw & RM))
573 549 errorcode |= 2;
574 550  
575 551 if (mmusr & (MMU_I | MMU_WP)) {
576 552 if (ssw & 4) {
577   - printk("Data %s fault at %#010lx in %s (pc=%#lx)\n",
  553 + pr_err("Data %s fault at %#010lx in %s (pc=%#lx)\n",
578 554 ssw & RW ? "read" : "write",
579 555 fp->un.fmtb.daddr,
580 556 space_names[ssw & DFC], fp->ptregs.pc);
581 557  
... ... @@ -587,9 +563,10 @@
587 563 } else if (!(mmusr & MMU_I)) {
588 564 /* probably a 020 cas fault */
589 565 if (!(ssw & RM) && send_fault_sig(&fp->ptregs) > 0)
590   - printk("unexpected bus error (%#x,%#x)\n", ssw, mmusr);
  566 + pr_err("unexpected bus error (%#x,%#x)\n", ssw,
  567 + mmusr);
591 568 } else if (mmusr & (MMU_B|MMU_L|MMU_S)) {
592   - printk("invalid %s access at %#lx from pc %#lx\n",
  569 + pr_err("invalid %s access at %#lx from pc %#lx\n",
593 570 !(ssw & RW) ? "write" : "read", addr,
594 571 fp->ptregs.pc);
595 572 die_if_kernel("Oops",&fp->ptregs,mmusr);
... ... @@ -600,7 +577,7 @@
600 577 static volatile long tlong;
601 578 #endif
602 579  
603   - printk("weird %s access at %#lx from pc %#lx (ssw is %#x)\n",
  580 + pr_err("weird %s access at %#lx from pc %#lx (ssw is %#x)\n",
604 581 !(ssw & RW) ? "write" : "read", addr,
605 582 fp->ptregs.pc, ssw);
606 583 asm volatile ("ptestr #1,%1@,#0\n\t"
607 584  
608 585  
609 586  
... ... @@ -609,18 +586,16 @@
609 586 : "a" (addr));
610 587 mmusr = temp;
611 588  
612   - printk ("level 0 mmusr is %#x\n", mmusr);
  589 + pr_err("level 0 mmusr is %#x\n", mmusr);
613 590 #if 0
614 591 asm volatile ("pmove %%tt0,%0"
615 592 : "=m" (tlong));
616   - printk("tt0 is %#lx, ", tlong);
  593 + pr_debug("tt0 is %#lx, ", tlong);
617 594 asm volatile ("pmove %%tt1,%0"
618 595 : "=m" (tlong));
619   - printk("tt1 is %#lx\n", tlong);
  596 + pr_debug("tt1 is %#lx\n", tlong);
620 597 #endif
621   -#ifdef DEBUG
622   - printk("Unknown SIGSEGV - 1\n");
623   -#endif
  598 + pr_debug("Unknown SIGSEGV - 1\n");
624 599 die_if_kernel("Oops",&fp->ptregs,mmusr);
625 600 force_sig(SIGSEGV, current);
626 601 return;
627 602  
... ... @@ -641,10 +616,9 @@
641 616 return;
642 617  
643 618 if (fp->ptregs.sr & PS_S) {
644   - printk("Instruction fault at %#010lx\n",
645   - fp->ptregs.pc);
  619 + pr_err("Instruction fault at %#010lx\n", fp->ptregs.pc);
646 620 buserr:
647   - printk ("BAD KERNEL BUSERR\n");
  621 + pr_err("BAD KERNEL BUSERR\n");
648 622 die_if_kernel("Oops",&fp->ptregs,0);
649 623 force_sig(SIGKILL, current);
650 624 return;
651 625  
652 626  
653 627  
... ... @@ -668,28 +642,22 @@
668 642 "pmove %%psr,%1"
669 643 : "=a&" (desc), "=m" (temp)
670 644 : "a" (addr));
  645 + pr_debug("mmusr is %#x for addr %#lx in task %p\n",
  646 + temp, addr, current);
  647 + pr_debug("descriptor address is 0x%p, contents %#lx\n",
  648 + __va(desc), *(unsigned long *)__va(desc));
671 649 #else
672 650 asm volatile ("ptestr #1,%1@,#7\n\t"
673 651 "pmove %%psr,%0"
674 652 : "=m" (temp) : "a" (addr));
675 653 #endif
676 654 mmusr = temp;
677   -
678   -#ifdef DEBUG
679   - printk ("mmusr is %#x for addr %#lx in task %p\n",
680   - mmusr, addr, current);
681   - printk ("descriptor address is %#lx, contents %#lx\n",
682   - __va(desc), *(unsigned long *)__va(desc));
683   -#endif
684   -
685 655 if (mmusr & MMU_I)
686 656 do_page_fault (&fp->ptregs, addr, 0);
687 657 else if (mmusr & (MMU_B|MMU_L|MMU_S)) {
688   - printk ("invalid insn access at %#lx from pc %#lx\n",
  658 + pr_err("invalid insn access at %#lx from pc %#lx\n",
689 659 addr, fp->ptregs.pc);
690   -#ifdef DEBUG
691   - printk("Unknown SIGSEGV - 2\n");
692   -#endif
  660 + pr_debug("Unknown SIGSEGV - 2\n");
693 661 die_if_kernel("Oops",&fp->ptregs,mmusr);
694 662 force_sig(SIGSEGV, current);
695 663 return;
... ... @@ -791,9 +759,7 @@
791 759 if (user_mode(&fp->ptregs))
792 760 current->thread.esp0 = (unsigned long) fp;
793 761  
794   -#ifdef DEBUG
795   - printk ("*** Bus Error *** Format is %x\n", fp->ptregs.format);
796   -#endif
  762 + pr_debug("*** Bus Error *** Format is %x\n", fp->ptregs.format);
797 763  
798 764 #if defined(CONFIG_COLDFIRE) && defined(CONFIG_MMU)
799 765 if (CPU_IS_COLDFIRE) {
... ... @@ -836,9 +802,7 @@
836 802 #endif
837 803 default:
838 804 die_if_kernel("bad frame format",&fp->ptregs,0);
839   -#ifdef DEBUG
840   - printk("Unknown SIGSEGV - 4\n");
841   -#endif
  805 + pr_debug("Unknown SIGSEGV - 4\n");
842 806 force_sig(SIGSEGV, current);
843 807 }
844 808 }
... ... @@ -852,7 +816,7 @@
852 816 unsigned long addr;
853 817 int i;
854 818  
855   - printk("Call Trace:");
  819 + pr_info("Call Trace:");
856 820 addr = (unsigned long)stack + THREAD_SIZE - 1;
857 821 endstack = (unsigned long *)(addr & -THREAD_SIZE);
858 822 i = 0;
859 823  
860 824  
... ... @@ -869,13 +833,13 @@
869 833 if (__kernel_text_address(addr)) {
870 834 #ifndef CONFIG_KALLSYMS
871 835 if (i % 5 == 0)
872   - printk("\n ");
  836 + pr_cont("\n ");
873 837 #endif
874   - printk(" [<%08lx>] %pS\n", addr, (void *)addr);
  838 + pr_cont(" [<%08lx>] %pS\n", addr, (void *)addr);
875 839 i++;
876 840 }
877 841 }
878   - printk("\n");
  842 + pr_cont("\n");
879 843 }
880 844  
881 845 void show_registers(struct pt_regs *regs)
882 846  
883 847  
884 848  
885 849  
886 850  
887 851  
888 852  
889 853  
890 854  
891 855  
892 856  
893 857  
894 858  
895 859  
896 860  
897 861  
898 862  
899 863  
900 864  
901 865  
... ... @@ -887,81 +851,87 @@
887 851 int i;
888 852  
889 853 print_modules();
890   - printk("PC: [<%08lx>] %pS\n", regs->pc, (void *)regs->pc);
891   - printk("SR: %04x SP: %p a2: %08lx\n", regs->sr, regs, regs->a2);
892   - printk("d0: %08lx d1: %08lx d2: %08lx d3: %08lx\n",
  854 + pr_info("PC: [<%08lx>] %pS\n", regs->pc, (void *)regs->pc);
  855 + pr_info("SR: %04x SP: %p a2: %08lx\n", regs->sr, regs, regs->a2);
  856 + pr_info("d0: %08lx d1: %08lx d2: %08lx d3: %08lx\n",
893 857 regs->d0, regs->d1, regs->d2, regs->d3);
894   - printk("d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n",
  858 + pr_info("d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n",
895 859 regs->d4, regs->d5, regs->a0, regs->a1);
896 860  
897   - printk("Process %s (pid: %d, task=%p)\n",
  861 + pr_info("Process %s (pid: %d, task=%p)\n",
898 862 current->comm, task_pid_nr(current), current);
899 863 addr = (unsigned long)&fp->un;
900   - printk("Frame format=%X ", regs->format);
  864 + pr_info("Frame format=%X ", regs->format);
901 865 switch (regs->format) {
902 866 case 0x2:
903   - printk("instr addr=%08lx\n", fp->un.fmt2.iaddr);
  867 + pr_cont("instr addr=%08lx\n", fp->un.fmt2.iaddr);
904 868 addr += sizeof(fp->un.fmt2);
905 869 break;
906 870 case 0x3:
907   - printk("eff addr=%08lx\n", fp->un.fmt3.effaddr);
  871 + pr_cont("eff addr=%08lx\n", fp->un.fmt3.effaddr);
908 872 addr += sizeof(fp->un.fmt3);
909 873 break;
910 874 case 0x4:
911   - printk((CPU_IS_060 ? "fault addr=%08lx fslw=%08lx\n"
912   - : "eff addr=%08lx pc=%08lx\n"),
913   - fp->un.fmt4.effaddr, fp->un.fmt4.pc);
  875 + if (CPU_IS_060)
  876 + pr_cont("fault addr=%08lx fslw=%08lx\n",
  877 + fp->un.fmt4.effaddr, fp->un.fmt4.pc);
  878 + else
  879 + pr_cont("eff addr=%08lx pc=%08lx\n",
  880 + fp->un.fmt4.effaddr, fp->un.fmt4.pc);
914 881 addr += sizeof(fp->un.fmt4);
915 882 break;
916 883 case 0x7:
917   - printk("eff addr=%08lx ssw=%04x faddr=%08lx\n",
  884 + pr_cont("eff addr=%08lx ssw=%04x faddr=%08lx\n",
918 885 fp->un.fmt7.effaddr, fp->un.fmt7.ssw, fp->un.fmt7.faddr);
919   - printk("wb 1 stat/addr/data: %04x %08lx %08lx\n",
  886 + pr_info("wb 1 stat/addr/data: %04x %08lx %08lx\n",
920 887 fp->un.fmt7.wb1s, fp->un.fmt7.wb1a, fp->un.fmt7.wb1dpd0);
921   - printk("wb 2 stat/addr/data: %04x %08lx %08lx\n",
  888 + pr_info("wb 2 stat/addr/data: %04x %08lx %08lx\n",
922 889 fp->un.fmt7.wb2s, fp->un.fmt7.wb2a, fp->un.fmt7.wb2d);
923   - printk("wb 3 stat/addr/data: %04x %08lx %08lx\n",
  890 + pr_info("wb 3 stat/addr/data: %04x %08lx %08lx\n",
924 891 fp->un.fmt7.wb3s, fp->un.fmt7.wb3a, fp->un.fmt7.wb3d);
925   - printk("push data: %08lx %08lx %08lx %08lx\n",
  892 + pr_info("push data: %08lx %08lx %08lx %08lx\n",
926 893 fp->un.fmt7.wb1dpd0, fp->un.fmt7.pd1, fp->un.fmt7.pd2,
927 894 fp->un.fmt7.pd3);
928 895 addr += sizeof(fp->un.fmt7);
929 896 break;
930 897 case 0x9:
931   - printk("instr addr=%08lx\n", fp->un.fmt9.iaddr);
  898 + pr_cont("instr addr=%08lx\n", fp->un.fmt9.iaddr);
932 899 addr += sizeof(fp->un.fmt9);
933 900 break;
934 901 case 0xa:
935   - printk("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n",
  902 + pr_cont("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n",
936 903 fp->un.fmta.ssw, fp->un.fmta.isc, fp->un.fmta.isb,
937 904 fp->un.fmta.daddr, fp->un.fmta.dobuf);
938 905 addr += sizeof(fp->un.fmta);
939 906 break;
940 907 case 0xb:
941   - printk("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n",
  908 + pr_cont("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n",
942 909 fp->un.fmtb.ssw, fp->un.fmtb.isc, fp->un.fmtb.isb,
943 910 fp->un.fmtb.daddr, fp->un.fmtb.dobuf);
944   - printk("baddr=%08lx dibuf=%08lx ver=%x\n",
  911 + pr_info("baddr=%08lx dibuf=%08lx ver=%x\n",
945 912 fp->un.fmtb.baddr, fp->un.fmtb.dibuf, fp->un.fmtb.ver);
946 913 addr += sizeof(fp->un.fmtb);
947 914 break;
948 915 default:
949   - printk("\n");
  916 + pr_cont("\n");
950 917 }
951 918 show_stack(NULL, (unsigned long *)addr);
952 919  
953   - printk("Code:");
  920 + pr_info("Code:");
954 921 set_fs(KERNEL_DS);
955 922 cp = (u16 *)regs->pc;
956 923 for (i = -8; i < 16; i++) {
957 924 if (get_user(c, cp + i) && i >= 0) {
958   - printk(" Bad PC value.");
  925 + pr_cont(" Bad PC value.");
959 926 break;
960 927 }
961   - printk(i ? " %04x" : " <%04x>", c);
  928 + if (i)
  929 + pr_cont(" %04x", c);
  930 + else
  931 + pr_cont(" <%04x>", c);
962 932 }
963 933 set_fs(old_fs);
964   - printk ("\n");
  934 + pr_cont("\n");
965 935 }
966 936  
967 937 void show_stack(struct task_struct *task, unsigned long *stack)
968 938  
969 939  
... ... @@ -978,16 +948,16 @@
978 948 }
979 949 endstack = (unsigned long *)(((unsigned long)stack + THREAD_SIZE - 1) & -THREAD_SIZE);
980 950  
981   - printk("Stack from %08lx:", (unsigned long)stack);
  951 + pr_info("Stack from %08lx:", (unsigned long)stack);
982 952 p = stack;
983 953 for (i = 0; i < kstack_depth_to_print; i++) {
984 954 if (p + 1 > endstack)
985 955 break;
986 956 if (i % 8 == 0)
987   - printk("\n ");
988   - printk(" %08lx", *p++);
  957 + pr_cont("\n ");
  958 + pr_cont(" %08lx", *p++);
989 959 }
990   - printk("\n");
  960 + pr_cont("\n");
991 961 show_trace(stack);
992 962 }
993 963  
994 964  
995 965  
996 966  
997 967  
998 968  
999 969  
... ... @@ -1005,32 +975,32 @@
1005 975  
1006 976 console_verbose();
1007 977 if (vector < ARRAY_SIZE(vec_names))
1008   - printk ("*** %s *** FORMAT=%X\n",
  978 + pr_err("*** %s *** FORMAT=%X\n",
1009 979 vec_names[vector],
1010 980 fp->ptregs.format);
1011 981 else
1012   - printk ("*** Exception %d *** FORMAT=%X\n",
  982 + pr_err("*** Exception %d *** FORMAT=%X\n",
1013 983 vector, fp->ptregs.format);
1014 984 if (vector == VEC_ADDRERR && CPU_IS_020_OR_030) {
1015 985 unsigned short ssw = fp->un.fmtb.ssw;
1016 986  
1017   - printk ("SSW=%#06x ", ssw);
  987 + pr_err("SSW=%#06x ", ssw);
1018 988  
1019 989 if (ssw & RC)
1020   - printk ("Pipe stage C instruction fault at %#010lx\n",
  990 + pr_err("Pipe stage C instruction fault at %#010lx\n",
1021 991 (fp->ptregs.format) == 0xA ?
1022 992 fp->ptregs.pc + 2 : fp->un.fmtb.baddr - 2);
1023 993 if (ssw & RB)
1024   - printk ("Pipe stage B instruction fault at %#010lx\n",
  994 + pr_err("Pipe stage B instruction fault at %#010lx\n",
1025 995 (fp->ptregs.format) == 0xA ?
1026 996 fp->ptregs.pc + 4 : fp->un.fmtb.baddr);
1027 997 if (ssw & DF)
1028   - printk ("Data %s fault at %#010lx in %s (pc=%#lx)\n",
  998 + pr_err("Data %s fault at %#010lx in %s (pc=%#lx)\n",
1029 999 ssw & RW ? "read" : "write",
1030 1000 fp->un.fmtb.daddr, space_names[ssw & DFC],
1031 1001 fp->ptregs.pc);
1032 1002 }
1033   - printk ("Current process id is %d\n", task_pid_nr(current));
  1003 + pr_err("Current process id is %d\n", task_pid_nr(current));
1034 1004 die_if_kernel("BAD KERNEL TRAP", &fp->ptregs, 0);
1035 1005 }
1036 1006  
... ... @@ -1162,7 +1132,7 @@
1162 1132 return;
1163 1133  
1164 1134 console_verbose();
1165   - printk("%s: %08x\n",str,nr);
  1135 + pr_crit("%s: %08x\n", str, nr);
1166 1136 show_registers(fp);
1167 1137 add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
1168 1138 do_exit(SIGSEGV);