Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+128 -146
+6 -7
arch/arm/common/sa1111.c
··· 282 282 } 283 283 284 284 if (i == 8) 285 - printk(KERN_ERR "Danger Will Robinson: failed to " 286 - "re-trigger IRQ%d\n", d->irq); 285 + pr_err("Danger Will Robinson: failed to re-trigger IRQ%d\n", 286 + d->irq); 287 287 return i == 8 ? -1 : 0; 288 288 } 289 289 ··· 384 384 } 385 385 386 386 if (i == 8) 387 - printk(KERN_ERR "Danger Will Robinson: failed to " 388 - "re-trigger IRQ%d\n", d->irq); 387 + pr_err("Danger Will Robinson: failed to re-trigger IRQ%d\n", 388 + d->irq); 389 389 return i == 8 ? -1 : 0; 390 390 } 391 391 ··· 740 740 goto err_unmap; 741 741 } 742 742 743 - printk(KERN_INFO "SA1111 Microprocessor Companion Chip: " 744 - "silicon revision %lx, metal revision %lx\n", 745 - (id & SKID_SIREV_MASK)>>4, (id & SKID_MTREV_MASK)); 743 + pr_info("SA1111 Microprocessor Companion Chip: silicon revision %lx, metal revision %lx\n", 744 + (id & SKID_SIREV_MASK) >> 4, id & SKID_MTREV_MASK); 746 745 747 746 /* 748 747 * We found it. Wake the chip up, and initialise.
+2 -4
arch/arm/kernel/atags_compat.c
··· 97 97 struct tag *tag = taglist; 98 98 99 99 if (params->u1.s.page_size != PAGE_SIZE) { 100 - printk(KERN_WARNING "Warning: bad configuration page, " 101 - "trying to continue\n"); 100 + pr_warn("Warning: bad configuration page, trying to continue\n"); 102 101 return; 103 102 } 104 103 ··· 108 109 params->u1.s.nr_pages != 0x04000 && 109 110 params->u1.s.nr_pages != 0x08000 && 110 111 params->u1.s.nr_pages != 0x10000) { 111 - printk(KERN_WARNING "Warning: bad NeTTrom parameters " 112 - "detected, using defaults\n"); 112 + pr_warn("Warning: bad NeTTrom parameters detected, using defaults\n"); 113 113 114 114 params->u1.s.nr_pages = 0x1000; /* 16MB */ 115 115 params->u1.s.ramdisk_size = 0;
+2 -3
arch/arm/kernel/atags_parse.c
··· 167 167 { 168 168 for (; t->hdr.size; t = tag_next(t)) 169 169 if (!parse_tag(t)) 170 - printk(KERN_WARNING 171 - "Ignoring unrecognised tag 0x%08x\n", 170 + pr_warn("Ignoring unrecognised tag 0x%08x\n", 172 171 t->hdr.tag); 173 172 } 174 173 ··· 192 193 */ 193 194 for_each_machine_desc(p) 194 195 if (machine_nr == p->nr) { 195 - printk("Machine: %s\n", p->name); 196 + pr_info("Machine: %s\n", p->name); 196 197 mdesc = p; 197 198 break; 198 199 }
+2 -2
arch/arm/kernel/atags_proc.c
··· 41 41 size_t size; 42 42 43 43 if (tag->hdr.tag != ATAG_CORE) { 44 - printk(KERN_INFO "No ATAGs?"); 44 + pr_info("No ATAGs?"); 45 45 return -EINVAL; 46 46 } 47 47 ··· 68 68 69 69 nomem: 70 70 kfree(b); 71 - printk(KERN_ERR "Exporting ATAGs: not enough memory\n"); 71 + pr_err("Exporting ATAGs: not enough memory\n"); 72 72 73 73 return -ENOMEM; 74 74 }
+1 -1
arch/arm/kernel/bios32.c
··· 355 355 /* 356 356 * Report what we did for this bus 357 357 */ 358 - printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", 358 + pr_info("PCI: bus%d: Fast back to back transfers %sabled\n", 359 359 bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); 360 360 } 361 361 EXPORT_SYMBOL(pcibios_fixup_bus);
+2 -2
arch/arm/kernel/dma-isa.c
··· 213 213 for (chan = 0; chan < 8; chan++) { 214 214 int ret = isa_dma_add(chan, &isa_dma[chan]); 215 215 if (ret) 216 - printk(KERN_ERR "ISADMA%u: unable to register: %d\n", 217 - chan, ret); 216 + pr_err("ISADMA%u: unable to register: %d\n", 217 + chan, ret); 218 218 } 219 219 220 220 request_dma(DMA_ISA_CASCADE, "cascade");
+11 -15
arch/arm/kernel/dma.c
··· 79 79 return ret; 80 80 81 81 bad_dma: 82 - printk(KERN_ERR "dma: trying to allocate DMA%d\n", chan); 82 + pr_err("dma: trying to allocate DMA%d\n", chan); 83 83 return -EINVAL; 84 84 85 85 busy: ··· 100 100 goto bad_dma; 101 101 102 102 if (dma->active) { 103 - printk(KERN_ERR "dma%d: freeing active DMA\n", chan); 103 + pr_err("dma%d: freeing active DMA\n", chan); 104 104 dma->d_ops->disable(chan, dma); 105 105 dma->active = 0; 106 106 } ··· 111 111 return; 112 112 } 113 113 114 - printk(KERN_ERR "dma%d: trying to free free DMA\n", chan); 114 + pr_err("dma%d: trying to free free DMA\n", chan); 115 115 return; 116 116 117 117 bad_dma: 118 - printk(KERN_ERR "dma: trying to free DMA%d\n", chan); 118 + pr_err("dma: trying to free DMA%d\n", chan); 119 119 } 120 120 EXPORT_SYMBOL(free_dma); 121 121 ··· 126 126 dma_t *dma = dma_channel(chan); 127 127 128 128 if (dma->active) 129 - printk(KERN_ERR "dma%d: altering DMA SG while " 130 - "DMA active\n", chan); 129 + pr_err("dma%d: altering DMA SG while DMA active\n", chan); 131 130 132 131 dma->sg = sg; 133 132 dma->sgcount = nr_sg; ··· 143 144 dma_t *dma = dma_channel(chan); 144 145 145 146 if (dma->active) 146 - printk(KERN_ERR "dma%d: altering DMA address while " 147 - "DMA active\n", chan); 147 + pr_err("dma%d: altering DMA address while DMA active\n", chan); 148 148 149 149 dma->sg = NULL; 150 150 dma->addr = addr; ··· 160 162 dma_t *dma = dma_channel(chan); 161 163 162 164 if (dma->active) 163 - printk(KERN_ERR "dma%d: altering DMA count while " 164 - "DMA active\n", chan); 165 + pr_err("dma%d: altering DMA count while DMA active\n", chan); 165 166 166 167 dma->sg = NULL; 167 168 dma->count = count; ··· 175 178 dma_t *dma = dma_channel(chan); 176 179 177 180 if (dma->active) 178 - printk(KERN_ERR "dma%d: altering DMA mode while " 179 - "DMA active\n", chan); 181 + pr_err("dma%d: altering DMA mode while DMA active\n", chan); 180 182 181 183 dma->dma_mode = mode; 182 184 dma->invalid = 1; ··· 198 202 return; 199 203 200 204 free_dma: 201 - printk(KERN_ERR "dma%d: trying to enable free DMA\n", chan); 205 + pr_err("dma%d: trying to enable free DMA\n", chan); 202 206 BUG(); 203 207 } 204 208 EXPORT_SYMBOL(enable_dma); ··· 219 223 return; 220 224 221 225 free_dma: 222 - printk(KERN_ERR "dma%d: trying to disable free DMA\n", chan); 226 + pr_err("dma%d: trying to disable free DMA\n", chan); 223 227 BUG(); 224 228 } 225 229 EXPORT_SYMBOL(disable_dma); ··· 236 240 237 241 void set_dma_page(unsigned int chan, char pagenr) 238 242 { 239 - printk(KERN_ERR "dma%d: trying to set_dma_page\n", chan); 243 + pr_err("dma%d: trying to set_dma_page\n", chan); 240 244 } 241 245 EXPORT_SYMBOL(set_dma_page); 242 246
+6 -6
arch/arm/kernel/etm.c
··· 213 213 int length; 214 214 215 215 if (!t->etb_regs) { 216 - printk(KERN_INFO "No tracing hardware found\n"); 216 + pr_info("No tracing hardware found\n"); 217 217 return; 218 218 } 219 219 ··· 229 229 230 230 etb_writel(t, first, ETBR_READADDR); 231 231 232 - printk(KERN_INFO "Trace buffer contents length: %d\n", length); 233 - printk(KERN_INFO "--- ETB buffer begin ---\n"); 232 + pr_info("Trace buffer contents length: %d\n", length); 233 + pr_info("--- ETB buffer begin ---\n"); 234 234 for (; length; length--) 235 235 printk("%08x", cpu_to_be32(etb_readl(t, ETBR_READMEM))); 236 - printk(KERN_INFO "\n--- ETB buffer end ---\n"); 236 + pr_info("\n--- ETB buffer end ---\n"); 237 237 238 238 /* deassert the overflow bit */ 239 239 etb_writel(t, 1, ETBR_CTRL); ··· 633 633 634 634 retval = amba_driver_register(&etb_driver); 635 635 if (retval) { 636 - printk(KERN_ERR "Failed to register etb\n"); 636 + pr_err("Failed to register etb\n"); 637 637 return retval; 638 638 } 639 639 640 640 retval = amba_driver_register(&etm_driver); 641 641 if (retval) { 642 642 amba_driver_unregister(&etb_driver); 643 - printk(KERN_ERR "Failed to probe etm\n"); 643 + pr_err("Failed to probe etm\n"); 644 644 return retval; 645 645 } 646 646
+1 -1
arch/arm/kernel/fiq.c
··· 124 124 void release_fiq(struct fiq_handler *f) 125 125 { 126 126 if (current_fiq != f) { 127 - printk(KERN_ERR "%s FIQ trying to release %s FIQ\n", 127 + pr_err("%s FIQ trying to release %s FIQ\n", 128 128 f->name, current_fiq->name); 129 129 dump_stack(); 130 130 return;
+1 -1
arch/arm/kernel/irq.c
··· 82 82 unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; 83 83 84 84 if (irq >= nr_irqs) { 85 - printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq); 85 + pr_err("Trying to set irq flags for IRQ%d\n", irq); 86 86 return; 87 87 } 88 88
+3 -3
arch/arm/kernel/machine_kexec.c
··· 126 126 msecs--; 127 127 } 128 128 if (atomic_read(&waiting_for_crash_ipi) > 0) 129 - printk(KERN_WARNING "Non-crashing CPUs did not react to IPI\n"); 129 + pr_warn("Non-crashing CPUs did not react to IPI\n"); 130 130 131 131 crash_save_cpu(regs, smp_processor_id()); 132 132 machine_kexec_mask_interrupts(); 133 133 134 - printk(KERN_INFO "Loading crashdump kernel...\n"); 134 + pr_info("Loading crashdump kernel...\n"); 135 135 } 136 136 137 137 /* ··· 177 177 reboot_entry_phys = (unsigned long)reboot_entry + 178 178 (reboot_code_buffer_phys - (unsigned long)reboot_code_buffer); 179 179 180 - printk(KERN_INFO "Bye!\n"); 180 + pr_info("Bye!\n"); 181 181 182 182 if (kexec_reinit) 183 183 kexec_reinit();
+1 -1
arch/arm/kernel/module.c
··· 251 251 #endif 252 252 253 253 default: 254 - printk(KERN_ERR "%s: unknown relocation: %u\n", 254 + pr_err("%s: unknown relocation: %u\n", 255 255 module->name, ELF32_R_TYPE(rel->r_info)); 256 256 return -ENOEXEC; 257 257 }
+8 -8
arch/arm/kernel/smp.c
··· 225 225 pr_err("CPU%u: cpu didn't die\n", cpu); 226 226 return; 227 227 } 228 - printk(KERN_NOTICE "CPU%u: shutdown\n", cpu); 228 + pr_notice("CPU%u: shutdown\n", cpu); 229 229 230 230 /* 231 231 * platform_cpu_kill() is generally expected to do the powering off ··· 235 235 * the requesting CPU and the dying CPU actually losing power. 236 236 */ 237 237 if (!platform_cpu_kill(cpu)) 238 - printk("CPU%u: unable to kill\n", cpu); 238 + pr_err("CPU%u: unable to kill\n", cpu); 239 239 } 240 240 241 241 /* ··· 351 351 352 352 cpu_init(); 353 353 354 - printk("CPU%u: Booted secondary processor\n", cpu); 354 + pr_info("CPU%u: Booted secondary processor\n", cpu); 355 355 356 356 preempt_disable(); 357 357 trace_hardirqs_off(); ··· 387 387 388 388 void __init smp_cpus_done(unsigned int max_cpus) 389 389 { 390 - printk(KERN_INFO "SMP: Total of %d processors activated.\n", 391 - num_online_cpus()); 390 + pr_info("SMP: Total of %d processors activated.\n", 391 + num_online_cpus()); 392 392 393 393 hyp_mode_check(); 394 394 } ··· 521 521 if (system_state == SYSTEM_BOOTING || 522 522 system_state == SYSTEM_RUNNING) { 523 523 raw_spin_lock(&stop_lock); 524 - printk(KERN_CRIT "CPU%u: stopping\n", cpu); 524 + pr_crit("CPU%u: stopping\n", cpu); 525 525 dump_stack(); 526 526 raw_spin_unlock(&stop_lock); 527 527 } ··· 615 615 break; 616 616 617 617 default: 618 - printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%x\n", 619 - cpu, ipinr); 618 + pr_crit("CPU%u: Unknown IPI message 0x%x\n", 619 + cpu, ipinr); 620 620 break; 621 621 } 622 622
+2 -2
arch/arm/kernel/smp_twd.c
··· 199 199 * the timer ticks 200 200 */ 201 201 if (twd_timer_rate == 0) { 202 - printk(KERN_INFO "Calibrating local timer... "); 202 + pr_info("Calibrating local timer... "); 203 203 204 204 /* Wait for a tick to start */ 205 205 waitjiffies = get_jiffies_64() + 1; ··· 223 223 224 224 twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5); 225 225 226 - printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000, 226 + pr_cont("%lu.%02luMHz.\n", twd_timer_rate / 1000000, 227 227 (twd_timer_rate / 10000) % 100); 228 228 } 229 229 }
+1 -1
arch/arm/kernel/swp_emulate.c
··· 260 260 return -ENOMEM; 261 261 #endif /* CONFIG_PROC_FS */ 262 262 263 - printk(KERN_NOTICE "Registering SWP/SWPB emulation handler\n"); 263 + pr_notice("Registering SWP/SWPB emulation handler\n"); 264 264 register_undef_hook(&swp_hook); 265 265 266 266 return 0;
+1 -1
arch/arm/kernel/thumbee.c
··· 72 72 if ((pfr0 & 0x0000f000) != 0x00001000) 73 73 return 0; 74 74 75 - printk(KERN_INFO "ThumbEE CPU extension supported.\n"); 75 + pr_info("ThumbEE CPU extension supported.\n"); 76 76 elf_hwcap |= HWCAP_THUMBEE; 77 77 thread_register_notifier(&thumbee_notifier_block); 78 78
+2 -2
arch/arm/kernel/topology.c
··· 165 165 166 166 set_capacity_scale(cpu, cpu_capacity(cpu) / middle_capacity); 167 167 168 - printk(KERN_INFO "CPU%u: update cpu_capacity %lu\n", 168 + pr_info("CPU%u: update cpu_capacity %lu\n", 169 169 cpu, arch_scale_cpu_capacity(NULL, cpu)); 170 170 } 171 171 ··· 269 269 270 270 update_cpu_capacity(cpuid); 271 271 272 - printk(KERN_INFO "CPU%u: thread %d, cpu %d, socket %d, mpidr %x\n", 272 + pr_info("CPU%u: thread %d, cpu %d, socket %d, mpidr %x\n", 273 273 cpuid, cpu_topology[cpuid].thread_id, 274 274 cpu_topology[cpuid].core_id, 275 275 cpu_topology[cpuid].socket_id, mpidr);
+21 -21
arch/arm/kernel/traps.c
··· 198 198 } 199 199 200 200 if (!fp) { 201 - printk("no frame pointer"); 201 + pr_cont("no frame pointer"); 202 202 ok = 0; 203 203 } else if (verify_stack(fp)) { 204 - printk("invalid frame pointer 0x%08x", fp); 204 + pr_cont("invalid frame pointer 0x%08x", fp); 205 205 ok = 0; 206 206 } else if (fp < (unsigned long)end_of_stack(tsk)) 207 - printk("frame pointer underflow"); 208 - printk("\n"); 207 + pr_cont("frame pointer underflow"); 208 + pr_cont("\n"); 209 209 210 210 if (ok) 211 211 c_backtrace(fp, mode); ··· 240 240 static int die_counter; 241 241 int ret; 242 242 243 - printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP 244 - S_ISA "\n", str, err, ++die_counter); 243 + pr_emerg("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP S_ISA "\n", 244 + str, err, ++die_counter); 245 245 246 246 /* trap and error numbers are mostly meaningless on ARM */ 247 247 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV); ··· 250 250 251 251 print_modules(); 252 252 __show_regs(regs); 253 - printk(KERN_EMERG "Process %.*s (pid: %d, stack limit = 0x%p)\n", 254 - TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), end_of_stack(tsk)); 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)); 255 255 256 256 if (!user_mode(regs) || in_interrupt()) { 257 257 dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp, ··· 446 446 die_sig: 447 447 #ifdef CONFIG_DEBUG_USER 448 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 450 current->comm, task_pid_nr(current), pc); 451 451 __show_regs(regs); 452 452 dump_instr(KERN_INFO, regs); ··· 496 496 { 497 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 501 die("Oops - bad mode", regs, 0); 502 502 local_irq_disable(); ··· 516 516 517 517 #ifdef CONFIG_DEBUG_USER 518 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 520 task_pid_nr(current), current->comm, n); 521 521 dump_instr(KERN_ERR, regs); 522 522 } ··· 721 721 * something catastrophic has happened 722 722 */ 723 723 if (user_debug & UDBG_SYSCALL) { 724 - printk("[%d] %s: arm syscall %d\n", 724 + pr_err("[%d] %s: arm syscall %d\n", 725 725 task_pid_nr(current), current->comm, no); 726 726 dump_instr("", regs); 727 727 if (user_mode(regs)) { ··· 780 780 781 781 void __bad_xchg(volatile void *ptr, int size) 782 782 { 783 - printk("xchg: bad data size: pc 0x%p, ptr 0x%p, size %d\n", 784 - __builtin_return_address(0), ptr, size); 783 + pr_err("xchg: bad data size: pc 0x%p, ptr 0x%p, size %d\n", 784 + __builtin_return_address(0), ptr, size); 785 785 BUG(); 786 786 } 787 787 EXPORT_SYMBOL(__bad_xchg); ··· 798 798 799 799 #ifdef CONFIG_DEBUG_USER 800 800 if (user_debug & UDBG_BADABORT) { 801 - printk(KERN_ERR "[%d] %s: bad data abort: code %d instr 0x%08lx\n", 802 - task_pid_nr(current), current->comm, code, instr); 801 + pr_err("[%d] %s: bad data abort: code %d instr 0x%08lx\n", 802 + task_pid_nr(current), current->comm, code, instr); 803 803 dump_instr(KERN_ERR, regs); 804 804 show_pte(current->mm, addr); 805 805 } ··· 815 815 816 816 void __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 819 BUG(); 820 820 } 821 821 EXPORT_SYMBOL(__readwrite_bug); 822 822 823 823 void __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 828 828 void __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 833 833 void __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 838 838 asmlinkage void __div0(void) 839 839 { 840 - printk("Division by zero in kernel.\n"); 840 + pr_err("Division by zero in kernel.\n"); 841 841 dump_stack(); 842 842 } 843 843 EXPORT_SYMBOL(__div0);
+3 -4
arch/arm/kernel/xscale-cp0.c
··· 157 157 158 158 if (cpu_has_iwmmxt()) { 159 159 #ifndef CONFIG_IWMMXT 160 - printk(KERN_WARNING "CAUTION: XScale iWMMXt coprocessor " 161 - "detected, but kernel support is missing.\n"); 160 + pr_warn("CAUTION: XScale iWMMXt coprocessor detected, but kernel support is missing.\n"); 162 161 #else 163 - printk(KERN_INFO "XScale iWMMXt coprocessor detected.\n"); 162 + pr_info("XScale iWMMXt coprocessor detected.\n"); 164 163 elf_hwcap |= HWCAP_IWMMXT; 165 164 thread_register_notifier(&iwmmxt_notifier_block); 166 165 #endif 167 166 } else { 168 - printk(KERN_INFO "XScale DSP coprocessor detected.\n"); 167 + pr_info("XScale DSP coprocessor detected.\n"); 169 168 thread_register_notifier(&dsp_notifier_block); 170 169 cp_access |= 1; 171 170 }
+5 -5
arch/arm/mm/alignment.c
··· 113 113 new_usermode |= UM_FIXUP; 114 114 115 115 if (warn) 116 - printk(KERN_WARNING "alignment: ignoring faults is unsafe on this CPU. Defaulting to fixup mode.\n"); 116 + pr_warn("alignment: ignoring faults is unsafe on this CPU. Defaulting to fixup mode.\n"); 117 117 } 118 118 119 119 return new_usermode; ··· 523 523 * processor for us. 524 524 */ 525 525 if (addr != eaddr) { 526 - printk(KERN_ERR "LDMSTM: PC = %08lx, instr = %08lx, " 526 + pr_err("LDMSTM: PC = %08lx, instr = %08lx, " 527 527 "addr = %08lx, eaddr = %08lx\n", 528 528 instruction_pointer(regs), instr, addr, eaddr); 529 529 show_regs(regs); ··· 567 567 return TYPE_FAULT; 568 568 569 569 bad: 570 - printk(KERN_ERR "Alignment trap: not handling ldm with s-bit set\n"); 570 + pr_err("Alignment trap: not handling ldm with s-bit set\n"); 571 571 return TYPE_ERROR; 572 572 } 573 573 ··· 899 899 return 0; 900 900 901 901 swp: 902 - printk(KERN_ERR "Alignment trap: not handling swp instruction\n"); 902 + pr_err("Alignment trap: not handling swp instruction\n"); 903 903 904 904 bad: 905 905 /* 906 906 * Oops, we didn't handle the instruction. 907 907 */ 908 - printk(KERN_ERR "Alignment trap: not handling instruction " 908 + pr_err("Alignment trap: not handling instruction " 909 909 "%0*lx at [<%08lx>]\n", 910 910 isize << 1, 911 911 isize == 2 ? tinstr : instr, instrptr);
+3 -3
arch/arm/mm/cache-feroceon-l2.c
··· 313 313 */ 314 314 u = read_extra_features(); 315 315 if (!(u & 0x01000000)) { 316 - printk(KERN_INFO "Feroceon L2: Disabling L2 prefetch.\n"); 316 + pr_info("Feroceon L2: Disabling L2 prefetch.\n"); 317 317 write_extra_features(u | 0x01000000); 318 318 } 319 319 } ··· 326 326 if (!(u & 0x00400000)) { 327 327 int i, d; 328 328 329 - printk(KERN_INFO "Feroceon L2: Enabling L2\n"); 329 + pr_info("Feroceon L2: Enabling L2\n"); 330 330 331 331 d = flush_and_disable_dcache(); 332 332 i = invalidate_and_disable_icache(); ··· 353 353 354 354 enable_l2(); 355 355 356 - printk(KERN_INFO "Feroceon L2: Cache support initialised%s.\n", 356 + pr_info("Feroceon L2: Cache support initialised%s.\n", 357 357 l2_wt_override ? ", in WT override mode" : ""); 358 358 } 359 359 #ifdef CONFIG_OF
+6 -6
arch/arm/mm/cache-tauros2.c
··· 185 185 u &= ~0x01000000; 186 186 else 187 187 u |= 0x01000000; 188 - printk(KERN_INFO "Tauros2: %s L2 prefetch.\n", 188 + pr_info("Tauros2: %s L2 prefetch.\n", 189 189 (features & CACHE_TAUROS2_PREFETCH_ON) 190 190 ? "Enabling" : "Disabling"); 191 191 ··· 193 193 u |= 0x00100000; 194 194 else 195 195 u &= ~0x00100000; 196 - printk(KERN_INFO "Tauros2: %s line fill burt8.\n", 196 + pr_info("Tauros2: %s line fill burt8.\n", 197 197 (features & CACHE_TAUROS2_LINEFILL_BURST8) 198 198 ? "Enabling" : "Disabling"); 199 199 ··· 216 216 */ 217 217 feat = read_extra_features(); 218 218 if (!(feat & 0x00400000)) { 219 - printk(KERN_INFO "Tauros2: Enabling L2 cache.\n"); 219 + pr_info("Tauros2: Enabling L2 cache.\n"); 220 220 write_extra_features(feat | 0x00400000); 221 221 } 222 222 ··· 253 253 */ 254 254 actlr = read_actlr(); 255 255 if (!(actlr & 0x00000002)) { 256 - printk(KERN_INFO "Tauros2: Enabling L2 cache.\n"); 256 + pr_info("Tauros2: Enabling L2 cache.\n"); 257 257 write_actlr(actlr | 0x00000002); 258 258 } 259 259 ··· 262 262 #endif 263 263 264 264 if (mode == NULL) { 265 - printk(KERN_CRIT "Tauros2: Unable to detect CPU mode.\n"); 265 + pr_crit("Tauros2: Unable to detect CPU mode.\n"); 266 266 return; 267 267 } 268 268 269 - printk(KERN_INFO "Tauros2: L2 cache support initialised " 269 + pr_info("Tauros2: L2 cache support initialised " 270 270 "in %s mode.\n", mode); 271 271 } 272 272
+3 -3
arch/arm/mm/fault-armv.c
··· 235 235 const char *reason; 236 236 unsigned long v = 1; 237 237 238 - printk(KERN_INFO "CPU: Testing write buffer coherency: "); 238 + pr_info("CPU: Testing write buffer coherency: "); 239 239 240 240 page = alloc_page(GFP_KERNEL); 241 241 if (page) { ··· 261 261 } 262 262 263 263 if (v) { 264 - printk("failed, %s\n", reason); 264 + pr_cont("failed, %s\n", reason); 265 265 shared_pte_mask = L_PTE_MT_UNCACHED; 266 266 } else { 267 - printk("ok\n"); 267 + pr_cont("ok\n"); 268 268 } 269 269 }
+15 -16
arch/arm/mm/fault.c
··· 63 63 if (!mm) 64 64 mm = &init_mm; 65 65 66 - printk(KERN_ALERT "pgd = %p\n", mm->pgd); 66 + pr_alert("pgd = %p\n", mm->pgd); 67 67 pgd = pgd_offset(mm, addr); 68 - printk(KERN_ALERT "[%08lx] *pgd=%08llx", 68 + pr_alert("[%08lx] *pgd=%08llx", 69 69 addr, (long long)pgd_val(*pgd)); 70 70 71 71 do { ··· 77 77 break; 78 78 79 79 if (pgd_bad(*pgd)) { 80 - printk("(bad)"); 80 + pr_cont("(bad)"); 81 81 break; 82 82 } 83 83 84 84 pud = pud_offset(pgd, addr); 85 85 if (PTRS_PER_PUD != 1) 86 - printk(", *pud=%08llx", (long long)pud_val(*pud)); 86 + pr_cont(", *pud=%08llx", (long long)pud_val(*pud)); 87 87 88 88 if (pud_none(*pud)) 89 89 break; 90 90 91 91 if (pud_bad(*pud)) { 92 - printk("(bad)"); 92 + pr_cont("(bad)"); 93 93 break; 94 94 } 95 95 96 96 pmd = pmd_offset(pud, addr); 97 97 if (PTRS_PER_PMD != 1) 98 - printk(", *pmd=%08llx", (long long)pmd_val(*pmd)); 98 + pr_cont(", *pmd=%08llx", (long long)pmd_val(*pmd)); 99 99 100 100 if (pmd_none(*pmd)) 101 101 break; 102 102 103 103 if (pmd_bad(*pmd)) { 104 - printk("(bad)"); 104 + pr_cont("(bad)"); 105 105 break; 106 106 } 107 107 ··· 110 110 break; 111 111 112 112 pte = pte_offset_map(pmd, addr); 113 - printk(", *pte=%08llx", (long long)pte_val(*pte)); 113 + pr_cont(", *pte=%08llx", (long long)pte_val(*pte)); 114 114 #ifndef CONFIG_ARM_LPAE 115 - printk(", *ppte=%08llx", 115 + pr_cont(", *ppte=%08llx", 116 116 (long long)pte_val(pte[PTE_HWTABLE_PTRS])); 117 117 #endif 118 118 pte_unmap(pte); 119 119 } while(0); 120 120 121 - printk("\n"); 121 + pr_cont("\n"); 122 122 } 123 123 #else /* CONFIG_MMU */ 124 124 void show_pte(struct mm_struct *mm, unsigned long addr) ··· 142 142 * No handler, we'll have to terminate things with extreme prejudice. 143 143 */ 144 144 bust_spinlocks(1); 145 - printk(KERN_ALERT 146 - "Unable to handle kernel %s at virtual address %08lx\n", 147 - (addr < PAGE_SIZE) ? "NULL pointer dereference" : 148 - "paging request", addr); 145 + pr_alert("Unable to handle kernel %s at virtual address %08lx\n", 146 + (addr < PAGE_SIZE) ? "NULL pointer dereference" : 147 + "paging request", addr); 149 148 150 149 show_pte(mm, addr); 151 150 die("Oops", regs, fsr); ··· 550 551 if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs)) 551 552 return; 552 553 553 - printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", 554 + pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n", 554 555 inf->name, fsr, addr); 555 556 556 557 info.si_signo = inf->sig; ··· 582 583 if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs)) 583 584 return; 584 585 585 - printk(KERN_ALERT "Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n", 586 + pr_alert("Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n", 586 587 inf->name, ifsr, addr); 587 588 588 589 info.si_signo = inf->sig;
+2 -2
arch/arm/mm/init.c
··· 67 67 68 68 static int __init parse_tag_initrd(const struct tag *tag) 69 69 { 70 - printk(KERN_WARNING "ATAG_INITRD is deprecated; " 70 + pr_warn("ATAG_INITRD is deprecated; " 71 71 "please update your bootloader.\n"); 72 72 phys_initrd_start = __virt_to_phys(tag->u.initrd.start); 73 73 phys_initrd_size = tag->u.initrd.size; ··· 544 544 #define MLM(b, t) b, t, ((t) - (b)) >> 20 545 545 #define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), SZ_1K) 546 546 547 - printk(KERN_NOTICE "Virtual kernel memory layout:\n" 547 + pr_notice("Virtual kernel memory layout:\n" 548 548 " vector : 0x%08lx - 0x%08lx (%4ld kB)\n" 549 549 #ifdef CONFIG_HAVE_TCM 550 550 " DTCM : 0x%08lx - 0x%08lx (%4ld kB)\n"
+15 -23
arch/arm/mm/mmu.c
··· 192 192 static int __init early_nocache(char *__unused) 193 193 { 194 194 char *p = "buffered"; 195 - printk(KERN_WARNING "nocache is deprecated; use cachepolicy=%s\n", p); 195 + pr_warn("nocache is deprecated; use cachepolicy=%s\n", p); 196 196 early_cachepolicy(p); 197 197 return 0; 198 198 } ··· 201 201 static int __init early_nowrite(char *__unused) 202 202 { 203 203 char *p = "uncached"; 204 - printk(KERN_WARNING "nowb is deprecated; use cachepolicy=%s\n", p); 204 + pr_warn("nowb is deprecated; use cachepolicy=%s\n", p); 205 205 early_cachepolicy(p); 206 206 return 0; 207 207 } ··· 786 786 length = PAGE_ALIGN(md->length); 787 787 788 788 if (!(cpu_architecture() >= CPU_ARCH_ARMv6 || cpu_is_xsc3())) { 789 - printk(KERN_ERR "MM: CPU does not support supersection " 790 - "mapping for 0x%08llx at 0x%08lx\n", 789 + pr_err("MM: CPU does not support supersection mapping for 0x%08llx at 0x%08lx\n", 791 790 (long long)__pfn_to_phys((u64)md->pfn), addr); 792 791 return; 793 792 } ··· 798 799 * of the actual domain assignments in use. 799 800 */ 800 801 if (type->domain) { 801 - printk(KERN_ERR "MM: invalid domain in supersection " 802 - "mapping for 0x%08llx at 0x%08lx\n", 802 + pr_err("MM: invalid domain in supersection mapping for 0x%08llx at 0x%08lx\n", 803 803 (long long)__pfn_to_phys((u64)md->pfn), addr); 804 804 return; 805 805 } 806 806 807 807 if ((addr | length | __pfn_to_phys(md->pfn)) & ~SUPERSECTION_MASK) { 808 - printk(KERN_ERR "MM: cannot create mapping for 0x%08llx" 809 - " at 0x%08lx invalid alignment\n", 808 + pr_err("MM: cannot create mapping for 0x%08llx at 0x%08lx invalid alignment\n", 810 809 (long long)__pfn_to_phys((u64)md->pfn), addr); 811 810 return; 812 811 } ··· 847 850 pgd_t *pgd; 848 851 849 852 if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) { 850 - printk(KERN_WARNING "BUG: not creating mapping for 0x%08llx" 851 - " at 0x%08lx in user region\n", 852 - (long long)__pfn_to_phys((u64)md->pfn), md->virtual); 853 + pr_warn("BUG: not creating mapping for 0x%08llx at 0x%08lx in user region\n", 854 + (long long)__pfn_to_phys((u64)md->pfn), md->virtual); 853 855 return; 854 856 } 855 857 856 858 if ((md->type == MT_DEVICE || md->type == MT_ROM) && 857 859 md->virtual >= PAGE_OFFSET && 858 860 (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) { 859 - printk(KERN_WARNING "BUG: mapping for 0x%08llx" 860 - " at 0x%08lx out of vmalloc space\n", 861 - (long long)__pfn_to_phys((u64)md->pfn), md->virtual); 861 + pr_warn("BUG: mapping for 0x%08llx at 0x%08lx out of vmalloc space\n", 862 + (long long)__pfn_to_phys((u64)md->pfn), md->virtual); 862 863 } 863 864 864 865 type = &mem_types[md->type]; ··· 876 881 length = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK)); 877 882 878 883 if (type->prot_l1 == 0 && ((addr | phys | length) & ~SECTION_MASK)) { 879 - printk(KERN_WARNING "BUG: map for 0x%08llx at 0x%08lx can not " 880 - "be mapped using pages, ignoring.\n", 881 - (long long)__pfn_to_phys(md->pfn), addr); 884 + pr_warn("BUG: map for 0x%08llx at 0x%08lx can not be mapped using pages, ignoring.\n", 885 + (long long)__pfn_to_phys(md->pfn), addr); 882 886 return; 883 887 } 884 888 ··· 1047 1053 1048 1054 if (vmalloc_reserve < SZ_16M) { 1049 1055 vmalloc_reserve = SZ_16M; 1050 - printk(KERN_WARNING 1051 - "vmalloc area too small, limiting to %luMB\n", 1056 + pr_warn("vmalloc area too small, limiting to %luMB\n", 1052 1057 vmalloc_reserve >> 20); 1053 1058 } 1054 1059 1055 1060 if (vmalloc_reserve > VMALLOC_END - (PAGE_OFFSET + SZ_32M)) { 1056 1061 vmalloc_reserve = VMALLOC_END - (PAGE_OFFSET + SZ_32M); 1057 - printk(KERN_WARNING 1058 - "vmalloc area is too big, limiting to %luMB\n", 1062 + pr_warn("vmalloc area is too big, limiting to %luMB\n", 1059 1063 vmalloc_reserve >> 20); 1060 1064 } 1061 1065 ··· 1086 1094 1087 1095 if (highmem) { 1088 1096 pr_notice("Ignoring RAM at %pa-%pa (!CONFIG_HIGHMEM)\n", 1089 - &block_start, &block_end); 1097 + &block_start, &block_end); 1090 1098 memblock_remove(reg->base, reg->size); 1091 1099 continue; 1092 1100 } ··· 1095 1103 phys_addr_t overlap_size = reg->size - size_limit; 1096 1104 1097 1105 pr_notice("Truncating RAM at %pa-%pa to -%pa", 1098 - &block_start, &block_end, &vmalloc_limit); 1106 + &block_start, &block_end, &vmalloc_limit); 1099 1107 memblock_remove(vmalloc_limit, overlap_size); 1100 1108 block_end = vmalloc_limit; 1101 1109 }
+2 -2
arch/arm/nwfpe/fpmodule.c
··· 86 86 static int __init fpe_init(void) 87 87 { 88 88 if (sizeof(FPA11) > sizeof(union fp_state)) { 89 - printk(KERN_ERR "nwfpe: bad structure size\n"); 89 + pr_err("nwfpe: bad structure size\n"); 90 90 return -EINVAL; 91 91 } 92 92 93 93 if (sizeof(FPREG) != 12) { 94 - printk(KERN_ERR "nwfpe: bad register size\n"); 94 + pr_err("nwfpe: bad register size\n"); 95 95 return -EINVAL; 96 96 } 97 97 if (fpe_type[0] && strcmp(fpe_type, "nwfpe"))
+1 -1
arch/arm/vfp/vfpsingle.c
··· 290 290 u32 z, a; 291 291 292 292 if ((significand & 0xc0000000) != 0x40000000) { 293 - printk(KERN_WARNING "VFP: estimate_sqrt: invalid significand\n"); 293 + pr_warn("VFP: estimate_sqrt: invalid significand\n"); 294 294 } 295 295 296 296 a = significand << 1;