aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/traps.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-10-28 07:26:42 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-11-21 10:24:50 -0500
commit4ed89f2228061422ce5f62545fd0b6f6648bd2cc (patch)
tree0f37768acf995006a4299d80122a3f924e5c5763 /arch/arm/kernel/traps.c
parentc2459d35f5b8de077fde859b8c96a23f309b9ab2 (diff)
ARM: convert printk(KERN_* to pr_*
Convert many (but not all) printk(KERN_* to pr_* to simplify the code. We take the opportunity to join some printk lines together so we don't split the message across several lines, and we also add a few levels to some messages which were previously missing them. Tested-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r--arch/arm/kernel/traps.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 0c8b10801d36..bb121b52ef36 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -198,14 +198,14 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
198 } 198 }
199 199
200 if (!fp) { 200 if (!fp) {
201 printk("no frame pointer"); 201 pr_cont("no frame pointer");
202 ok = 0; 202 ok = 0;
203 } else if (verify_stack(fp)) { 203 } else if (verify_stack(fp)) {
204 printk("invalid frame pointer 0x%08x", fp); 204 pr_cont("invalid frame pointer 0x%08x", fp);
205 ok = 0; 205 ok = 0;
206 } else if (fp < (unsigned long)end_of_stack(tsk)) 206 } else if (fp < (unsigned long)end_of_stack(tsk))
207 printk("frame pointer underflow"); 207 pr_cont("frame pointer underflow");
208 printk("\n"); 208 pr_cont("\n");
209 209
210 if (ok) 210 if (ok)
211 c_backtrace(fp, mode); 211 c_backtrace(fp, mode);
@@ -240,8 +240,8 @@ static int __die(const char *str, int err, struct pt_regs *regs)
240 static int die_counter; 240 static int die_counter;
241 int ret; 241 int ret;
242 242
243 printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP 243 pr_emerg("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP S_ISA "\n",
244 S_ISA "\n", str, err, ++die_counter); 244 str, err, ++die_counter);
245 245
246 /* trap and error numbers are mostly meaningless on ARM */ 246 /* trap and error numbers are mostly meaningless on ARM */
247 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV); 247 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV);
@@ -250,8 +250,8 @@ static int __die(const char *str, int err, struct pt_regs *regs)
250 250
251 print_modules(); 251 print_modules();
252 __show_regs(regs); 252 __show_regs(regs);
253 printk(KERN_EMERG "Process %.*s (pid: %d, stack limit = 0x%p)\n", 253 pr_emerg("Process %.*s (pid: %d, stack limit = 0x%p)\n",
254 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), end_of_stack(tsk)); 254 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), end_of_stack(tsk));
255 255
256 if (!user_mode(regs) || in_interrupt()) { 256 if (!user_mode(regs) || in_interrupt()) {
257 dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp, 257 dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp,
@@ -446,7 +446,7 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
446die_sig: 446die_sig:
447#ifdef CONFIG_DEBUG_USER 447#ifdef CONFIG_DEBUG_USER
448 if (user_debug & UDBG_UNDEFINED) { 448 if (user_debug & UDBG_UNDEFINED) {
449 printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n", 449 pr_info("%s (%d): undefined instruction: pc=%p\n",
450 current->comm, task_pid_nr(current), pc); 450 current->comm, task_pid_nr(current), pc);
451 __show_regs(regs); 451 __show_regs(regs);
452 dump_instr(KERN_INFO, regs); 452 dump_instr(KERN_INFO, regs);
@@ -496,7 +496,7 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason)
496{ 496{
497 console_verbose(); 497 console_verbose();
498 498
499 printk(KERN_CRIT "Bad mode in %s handler detected\n", handler[reason]); 499 pr_crit("Bad mode in %s handler detected\n", handler[reason]);
500 500
501 die("Oops - bad mode", regs, 0); 501 die("Oops - bad mode", regs, 0);
502 local_irq_disable(); 502 local_irq_disable();
@@ -516,7 +516,7 @@ static int bad_syscall(int n, struct pt_regs *regs)
516 516
517#ifdef CONFIG_DEBUG_USER 517#ifdef CONFIG_DEBUG_USER
518 if (user_debug & UDBG_SYSCALL) { 518 if (user_debug & UDBG_SYSCALL) {
519 printk(KERN_ERR "[%d] %s: obsolete system call %08x.\n", 519 pr_err("[%d] %s: obsolete system call %08x.\n",
520 task_pid_nr(current), current->comm, n); 520 task_pid_nr(current), current->comm, n);
521 dump_instr(KERN_ERR, regs); 521 dump_instr(KERN_ERR, regs);
522 } 522 }
@@ -721,7 +721,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
721 * something catastrophic has happened 721 * something catastrophic has happened
722 */ 722 */
723 if (user_debug & UDBG_SYSCALL) { 723 if (user_debug & UDBG_SYSCALL) {
724 printk("[%d] %s: arm syscall %d\n", 724 pr_err("[%d] %s: arm syscall %d\n",
725 task_pid_nr(current), current->comm, no); 725 task_pid_nr(current), current->comm, no);
726 dump_instr("", regs); 726 dump_instr("", regs);
727 if (user_mode(regs)) { 727 if (user_mode(regs)) {
@@ -780,8 +780,8 @@ late_initcall(arm_mrc_hook_init);
780 780
781void __bad_xchg(volatile void *ptr, int size) 781void __bad_xchg(volatile void *ptr, int size)
782{ 782{
783 printk("xchg: bad data size: pc 0x%p, ptr 0x%p, size %d\n", 783 pr_err("xchg: bad data size: pc 0x%p, ptr 0x%p, size %d\n",
784 __builtin_return_address(0), ptr, size); 784 __builtin_return_address(0), ptr, size);
785 BUG(); 785 BUG();
786} 786}
787EXPORT_SYMBOL(__bad_xchg); 787EXPORT_SYMBOL(__bad_xchg);
@@ -798,8 +798,8 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
798 798
799#ifdef CONFIG_DEBUG_USER 799#ifdef CONFIG_DEBUG_USER
800 if (user_debug & UDBG_BADABORT) { 800 if (user_debug & UDBG_BADABORT) {
801 printk(KERN_ERR "[%d] %s: bad data abort: code %d instr 0x%08lx\n", 801 pr_err("[%d] %s: bad data abort: code %d instr 0x%08lx\n",
802 task_pid_nr(current), current->comm, code, instr); 802 task_pid_nr(current), current->comm, code, instr);
803 dump_instr(KERN_ERR, regs); 803 dump_instr(KERN_ERR, regs);
804 show_pte(current->mm, addr); 804 show_pte(current->mm, addr);
805 } 805 }
@@ -815,29 +815,29 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
815 815
816void __readwrite_bug(const char *fn) 816void __readwrite_bug(const char *fn)
817{ 817{
818 printk("%s called, but not implemented\n", fn); 818 pr_err("%s called, but not implemented\n", fn);
819 BUG(); 819 BUG();
820} 820}
821EXPORT_SYMBOL(__readwrite_bug); 821EXPORT_SYMBOL(__readwrite_bug);
822 822
823void __pte_error(const char *file, int line, pte_t pte) 823void __pte_error(const char *file, int line, pte_t pte)
824{ 824{
825 printk("%s:%d: bad pte %08llx.\n", file, line, (long long)pte_val(pte)); 825 pr_err("%s:%d: bad pte %08llx.\n", file, line, (long long)pte_val(pte));
826} 826}
827 827
828void __pmd_error(const char *file, int line, pmd_t pmd) 828void __pmd_error(const char *file, int line, pmd_t pmd)
829{ 829{
830 printk("%s:%d: bad pmd %08llx.\n", file, line, (long long)pmd_val(pmd)); 830 pr_err("%s:%d: bad pmd %08llx.\n", file, line, (long long)pmd_val(pmd));
831} 831}
832 832
833void __pgd_error(const char *file, int line, pgd_t pgd) 833void __pgd_error(const char *file, int line, pgd_t pgd)
834{ 834{
835 printk("%s:%d: bad pgd %08llx.\n", file, line, (long long)pgd_val(pgd)); 835 pr_err("%s:%d: bad pgd %08llx.\n", file, line, (long long)pgd_val(pgd));
836} 836}
837 837
838asmlinkage void __div0(void) 838asmlinkage void __div0(void)
839{ 839{
840 printk("Division by zero in kernel.\n"); 840 pr_err("Division by zero in kernel.\n");
841 dump_stack(); 841 dump_stack();
842} 842}
843EXPORT_SYMBOL(__div0); 843EXPORT_SYMBOL(__div0);