diff -urN linux-2.6.0-test1/arch/mips64/kernel/branch.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/branch.c --- linux-2.6.0-test1/arch/mips64/kernel/branch.c 2003-07-13 23:32:39.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/branch.c 2003-07-18 16:44:23.000000000 -0400 @@ -27,7 +27,7 @@ epc = regs->cp0_epc; if (epc & 3) { - printk("%s: unaligned epc - sending SIGBUS.\n", current->comm); + printk(KERN_ERR "%s: unaligned epc - sending SIGBUS.\n", current->comm); force_sig(SIGBUS, current); return -EFAULT; } diff -urN linux-2.6.0-test1/arch/mips64/kernel/cpu-probe.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/cpu-probe.c --- linux-2.6.0-test1/arch/mips64/kernel/cpu-probe.c 2003-07-13 23:36:43.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/cpu-probe.c 2003-07-18 16:56:18.000000000 -0400 @@ -72,16 +72,16 @@ { struct cpuinfo_mips *c = ¤t_cpu_data; - printk("Checking for 'wait' instruction... "); + printk(KERN_INFO "Checking for 'wait' instruction... "); switch (c->cputype) { case CPU_R3081: case CPU_R3081E: cpu_wait = r3081_wait; - printk(" available.\n"); + printk(KERN_INFO " available.\n"); break; case CPU_TX3927: cpu_wait = r39xx_wait; - printk(" available.\n"); + printk(KERN_INFO " available.\n"); break; case CPU_R4200: /* case CPU_R4300: */ @@ -99,16 +99,16 @@ case CPU_5KC: /* case CPU_20KC:*/ cpu_wait = r4k_wait; - printk(" available.\n"); + printk(KERN_INFO " available.\n"); break; case CPU_AU1000: case CPU_AU1100: case CPU_AU1500: cpu_wait = au1k_wait; - printk(" available.\n"); + printk(KERN_INFO " available.\n"); break; default: - printk(" unavailable.\n"); + printk(KERN_INFO " unavailable.\n"); break; } } @@ -119,7 +119,7 @@ int m1, m2; long p, s, v; - printk("Checking for the multiply/shift bug... "); + printk(KERN_INFO "Checking for the multiply/shift bug... "); local_irq_save(flags); /* @@ -146,11 +146,11 @@ local_irq_restore(flags); if (v == 5L << 32) { - printk("no.\n"); + printk(KERN_INFO "no.\n"); return; } - printk("yes, workaround... "); + printk(KERN_INFO "yes, workaround... "); local_irq_save(flags); /* * We want the multiply and the shift to be isolated from the @@ -178,11 +178,11 @@ local_irq_restore(flags); if (v == 5L << 32) { - printk("yes.\n"); + printk(KERN_INFO "yes.\n"); return; } - printk("no.\n"); + printk(KERN_INFO "no.\n"); panic("Reliable operation impossible!\n" #ifndef CONFIG_CPU_R4000 "Configure for R4000 to enable the workaround." @@ -207,7 +207,7 @@ void *handler; long v; - printk("Checking for the daddi bug... "); + printk(KERN_INFO "Checking for the daddi bug... "); local_irq_save(flags); handler = set_except_vector(12, handle_daddi_ov); @@ -235,11 +235,11 @@ local_irq_restore(flags); if (daddi_ov) { - printk("no.\n"); + printk(KERN_INFO "no.\n"); return; } - printk("yes, workaround... "); + printk(KERN_INFO "yes, workaround... "); local_irq_save(flags); handler = set_except_vector(12, handle_daddi_ov); @@ -251,11 +251,11 @@ local_irq_restore(flags); if (daddi_ov) { - printk("yes.\n"); + printk(KERN_INFO "yes.\n"); return; } - printk("no.\n"); + printk(KERN_INFO "no.\n"); panic("Reliable operation impossible!\n" #if !defined(CONFIG_CPU_R4000) && !defined(CONFIG_CPU_R4400) "Configure for R4000 or R4400 to enable the workaround." @@ -269,7 +269,7 @@ { long v, w; - printk("Checking for the daddiu bug... "); + printk(KERN_INFO "Checking for the daddiu bug... "); /* * The following code leads to a wrong result of daddiu when @@ -302,11 +302,11 @@ : "r" (0x7fffffffffffedcd), "I" (0x1234)); if (v == w) { - printk("no.\n"); + printk(KERN_INFO "no.\n"); return; } - printk("yes, workaround... "); + printk(KERN_INFO "yes, workaround... "); asm volatile( "daddiu %0, %2, %3\n\t" @@ -316,11 +316,11 @@ : "r" (0x7fffffffffffedcd), "I" (0x1234)); if (v == w) { - printk("yes.\n"); + printk(KERN_INFO "yes.\n"); return; } - printk("no.\n"); + printk(KERN_INFO "no.\n"); panic("Reliable operation impossible!\n" #if !defined(CONFIG_CPU_R4000) && !defined(CONFIG_CPU_R4400) "Configure for R4000 or R4400 to enable the workaround." @@ -740,7 +740,7 @@ { struct cpuinfo_mips *c = ¤t_cpu_data; - printk("CPU revision is: %08x\n", c->processor_id); + printk(KERN_INFO "CPU revision is: %08x\n", c->processor_id); if (c->options & MIPS_CPU_FPU) - printk("FPU revision is: %08x\n", c->fpu_id); + printk(KERN_INFO "FPU revision is: %08x\n", c->fpu_id); } diff -urN linux-2.6.0-test1/arch/mips64/kernel/i8259.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/i8259.c --- linux-2.6.0-test1/arch/mips64/kernel/i8259.c 2003-07-13 23:28:51.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/i8259.c 2003-07-18 16:40:06.000000000 -0400 @@ -209,7 +209,7 @@ * lets ACK and report it. [once per IRQ] */ if (!(spurious_irq_mask & irqmask)) { - printk("spurious 8259A interrupt: IRQ%d.\n", irq); + printk(KERN_NOTICE "spurious 8259A interrupt: IRQ%d.\n", irq); spurious_irq_mask |= irqmask; } atomic_inc(&irq_err_count); diff -urN linux-2.6.0-test1/arch/mips64/kernel/ioctl32.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/ioctl32.c --- linux-2.6.0-test1/arch/mips64/kernel/ioctl32.c 2003-07-13 23:34:30.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/ioctl32.c 2003-07-18 16:46:55.000000000 -0400 @@ -755,7 +755,7 @@ do { static int count = 0; if (++count <= 20) - printk("mt_ioctl: Unknown cmd fd(%d) " + printk(KERN_ERR "mt_ioctl: Unknown cmd fd(%d) " "cmd(%08x) arg(%08x)\n", (int)fd, (unsigned int)cmd, (unsigned int)arg); } while(0); diff -urN linux-2.6.0-test1/arch/mips64/kernel/irq.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/irq.c --- linux-2.6.0-test1/arch/mips64/kernel/irq.c 2003-07-13 23:33:48.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/irq.c 2003-07-18 16:45:17.000000000 -0400 @@ -60,7 +60,7 @@ * each architecture has to answer this themselves, it doesn't deserve * a generic callback i think. */ - printk("unexpected interrupt %d\n", irq); + printk(KERN_WARNING "unexpected interrupt %d\n", irq); } /* startup is the same as "enable", shutdown is same as "disable" */ @@ -176,7 +176,7 @@ printk(KERN_ERR "[<%p>]", action->handler); print_symbol(" (%s)", (unsigned long)action->handler); - printk("\n"); + printk(KERN_ERR "\n"); action = action->next; } while (action); } @@ -196,7 +196,7 @@ static int __init noirqdebug_setup(char *str) { noirqdebug = 1; - printk("IRQ lockup detection disabled\n"); + printk(KERN_WARNING "IRQ lockup detection disabled\n"); return 1; } @@ -321,7 +321,7 @@ desc->depth--; break; case 0: - printk("enable_irq(%u) unbalanced from %p\n", irq, + printk(KERN_WARNING "enable_irq(%u) unbalanced from %p\n", irq, __builtin_return_address(0)); } spin_unlock_irqrestore(&desc->lock, flags); @@ -468,7 +468,7 @@ */ if (irqflags & SA_SHIRQ) { if (!dev_id) - printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]); + printk(KERN_ERR "Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]); } #endif @@ -543,7 +543,7 @@ kfree(action); return; } - printk("Trying to free free IRQ%d\n",irq); + printk(KERN_NOTICE "Trying to free free IRQ%d\n",irq); spin_unlock_irqrestore(&desc->lock,flags); return; } diff -urN linux-2.6.0-test1/arch/mips64/kernel/linux32.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/linux32.c --- linux-2.6.0-test1/arch/mips64/kernel/linux32.c 2003-07-13 23:35:15.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/linux32.c 2003-07-18 16:47:31.000000000 -0400 @@ -331,7 +331,7 @@ char * filename; filename = getname((char *) (long)regs.regs[4]); - printk("Executing: %s\n", filename); + printk(KERN_NOTICE "Executing: %s\n", filename); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; diff -urN linux-2.6.0-test1/arch/mips64/kernel/module.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/module.c --- linux-2.6.0-test1/arch/mips64/kernel/module.c 2003-07-13 23:35:55.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/module.c 2003-07-18 16:54:17.000000000 -0400 @@ -47,7 +47,7 @@ if (!addr) return; if ((PAGE_SIZE-1) & (unsigned long) addr) { - printk("Trying to unmap module with bad address (%p)\n", addr); + printk(KERN_ERR "Trying to unmap module with bad address (%p)\n", addr); return; } @@ -57,7 +57,7 @@ goto found; } } - printk("Trying to unmap nonexistent module vm area (%p)\n", addr); + printk(KERN_ERR "Trying to unmap nonexistent module vm area (%p)\n", addr); return; found: @@ -197,7 +197,7 @@ uint32_t *location; Elf32_Addr v; - DEBUGP("Applying relocate section %u to %u\n", relsec, + DEBUGP(KERN_DEBUG "Applying relocate section %u to %u\n", relsec, sechdrs[relsec].sh_info); for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { /* This is where to make the change */ diff -urN linux-2.6.0-test1/arch/mips64/kernel/process.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/process.c --- linux-2.6.0-test1/arch/mips64/kernel/process.c 2003-07-13 23:32:29.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/process.c 2003-07-18 16:43:56.000000000 -0400 @@ -209,7 +209,7 @@ } } if (info->pc_offset == -1 || info->frame_offset == -1) { - printk("Can't analyze prologue code at %p\n", func); + printk(KERN_WARNING "Can't analyze prologue code at %p\n", func); info->pc_offset = -1; info->frame_offset = -1; return -1; diff -urN linux-2.6.0-test1/arch/mips64/kernel/ptrace.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/ptrace.c --- linux-2.6.0-test1/arch/mips64/kernel/ptrace.c 2003-07-13 23:36:49.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/ptrace.c 2003-07-18 16:56:40.000000000 -0400 @@ -287,7 +287,7 @@ lock_kernel(); #if 0 - printk("ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n", + printk(KERN_DEBUG "ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n", (int) request, (int) pid, (unsigned long) addr, (unsigned long) data); #endif diff -urN linux-2.6.0-test1/arch/mips64/kernel/setup.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/setup.c --- linux-2.6.0-test1/arch/mips64/kernel/setup.c 2003-07-13 23:28:55.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/setup.c 2003-07-18 16:43:11.000000000 -0400 @@ -147,7 +147,7 @@ int x = boot_mem_map.nr_map; if (x == BOOT_MEM_MAP_MAX) { - printk("Ooops! Too many entries in the memory map!\n"); + printk(KERN_ERR "Ooops! Too many entries in the memory map!\n"); return; } @@ -162,21 +162,21 @@ int i; for (i = 0; i < boot_mem_map.nr_map; i++) { - printk(" memory: %016Lx @ %016Lx ", + printk(KERN_INFO " memory: %016Lx @ %016Lx ", (unsigned long long) boot_mem_map.map[i].size, (unsigned long long) boot_mem_map.map[i].addr); switch (boot_mem_map.map[i].type) { case BOOT_MEM_RAM: - printk("(usable)\n"); + printk(KERN_INFO "(usable)\n"); break; case BOOT_MEM_ROM_DATA: - printk("(ROM data)\n"); + printk(KERN_INFO "(ROM data)\n"); break; case BOOT_MEM_RESERVED: - printk("(reserved)\n"); + printk(KERN_INFO "(reserved)\n"); break; default: - printk("type %lu\n", boot_mem_map.map[i].type); + printk(KERN_INFO "type %lu\n", boot_mem_map.map[i].type); break; } } @@ -189,7 +189,7 @@ int len = 0; int usermem = 0; - printk("Determined physical RAM map:\n"); + printk(KERN_INFO "Determined physical RAM map:\n"); print_memory_map(); for (;;) { @@ -228,7 +228,7 @@ *to = '\0'; if (usermem) { - printk("User-defined physical RAM map:\n"); + printk(KERN_INFO "User-defined physical RAM map:\n"); print_memory_map(); } } @@ -343,13 +343,13 @@ initrd_below_start_ok = 1; if (initrd_start) { unsigned long initrd_size = ((unsigned char *)initrd_end) - ((unsigned char *)initrd_start); - printk("Initial ramdisk at: 0x%p (%lu bytes)\n", + printk(KERN_INFO "Initial ramdisk at: 0x%p (%lu bytes)\n", (void *)initrd_start, initrd_size); /* FIXME: is this right? */ #ifndef CONFIG_SGI_IP27 if (CPHYSADDR(initrd_end) > PFN_PHYS(max_pfn)) { - printk("initrd extends beyond end of memory " + printk(KERN_INFO "initrd extends beyond end of memory " "(0x%p > 0x%p)\ndisabling initrd\n", (void *)CPHYSADDR(initrd_end), (void *)PFN_PHYS(max_pfn)); diff -urN linux-2.6.0-test1/arch/mips64/kernel/signal.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/signal.c --- linux-2.6.0-test1/arch/mips64/kernel/signal.c 2003-07-13 23:32:28.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/signal.c 2003-07-18 16:43:35.000000000 -0400 @@ -294,7 +294,7 @@ regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; #if DEBUG_SIG - printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n", + printk(KERN_DEBUG "SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n", current->comm, current->pid, frame, regs->cp0_epc, regs->regs[31]); #endif diff -urN linux-2.6.0-test1/arch/mips64/kernel/signal32.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/signal32.c --- linux-2.6.0-test1/arch/mips64/kernel/signal32.c 2003-07-13 23:34:32.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/signal32.c 2003-07-18 16:47:14.000000000 -0400 @@ -533,7 +533,7 @@ regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; #if DEBUG_SIG - printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n", + printk(KERN_DEBUG "SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n", current->comm, current->pid, frame, regs->cp0_epc, frame->sf_code); #endif @@ -604,7 +604,7 @@ regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; #if DEBUG_SIG - printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n", + printk(KERN_DEBUG "SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n", current->comm, current->pid, frame, regs->cp0_epc, frame->rs_code); #endif diff -urN linux-2.6.0-test1/arch/mips64/kernel/smp.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/smp.c --- linux-2.6.0-test1/arch/mips64/kernel/smp.c 2003-07-13 23:36:37.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/smp.c 2003-07-18 16:54:50.000000000 -0400 @@ -110,10 +110,10 @@ cacheflush_time = (cpu_khz>>10) * (cachesize<<10) / bandwidth; cache_decay_ticks = (long)cacheflush_time/cpu_khz * HZ / 1000; - printk("per-CPU timeslice cutoff: %ld.%02ld usecs.\n", + printk(KERN_NOTICE "per-CPU timeslice cutoff: %ld.%02ld usecs.\n", (long)cacheflush_time/(cpu_khz/1000), ((long)cacheflush_time*100/(cpu_khz/1000)) % 100); - printk("task migration cache decay timeout: %ld msecs.\n", + printk(KERN_NOTICE "task migration cache decay timeout: %ld msecs.\n", (cache_decay_ticks + 1) * 1000 / HZ); } @@ -145,7 +145,7 @@ pgd_current[cpu] = init_mm.pgd; cpu_data[cpu].udelay_val = loops_per_jiffy; prom_smp_finish(); - printk("Slave cpu booted successfully\n"); + printk(KERN_NOTICE "Slave cpu booted successfully\n"); CPUMASK_SETB(cpu_online_map, cpu); atomic_inc(&cpus_booted); cpu_idle(); diff -urN linux-2.6.0-test1/arch/mips64/kernel/traps.c linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/traps.c --- linux-2.6.0-test1/arch/mips64/kernel/traps.c 2003-07-13 23:35:52.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/kernel/traps.c 2003-07-18 16:51:57.000000000 -0400 @@ -80,25 +80,25 @@ sp = sp ? sp : (unsigned long *) &sp; - printk("Stack: "); + printk(KERN_EMERG "Stack: "); i = 1; while ((unsigned long) sp & (PAGE_SIZE - 1)) { if (i && ((i % (64 / sizeof(unsigned long))) == 0)) - printk("\n "); + printk(KERN_EMERG "\n "); if (i > 40) { - printk(" ..."); + printk(KERN_EMERG " ..."); break; } if (__get_user(stackdata, sp++)) { - printk(" (Bad stack address)"); + printk(KERN_EMERG " (Bad stack address)"); break; } - printk(" %0*lx", field, stackdata); + printk(KERN_EMERG " %0*lx", field, stackdata); i++; } - printk("\n"); + printk(KERN_EMERG "\n"); } void show_trace(struct task_struct *task, unsigned long *stack) @@ -109,18 +109,18 @@ if (!stack) stack = (unsigned long*)&stack; - printk("Call Trace:"); + printk(KERN_EMERG "Call Trace:"); #ifdef CONFIG_KALLSYMS - printk("\n"); + printk(KERN_EMERG "\n"); #endif while (((long) stack & (THREAD_SIZE-1)) != 0) { addr = *stack++; if (kernel_text_address(addr)) { - printk(" [<%0*lx>] ", field, addr); + printk(KERN_EMERG " [<%0*lx>] ", field, addr); print_symbol("%s\n", addr); } } - printk("\n"); + printk(KERN_EMERG "\n"); } void show_trace_task(struct task_struct *tsk) @@ -142,15 +142,15 @@ { long i; - printk("\nCode:"); + printk(KERN_EMERG "\nCode:"); for(i = -3 ; i < 6 ; i++) { unsigned int insn; if (__get_user(insn, pc + i)) { - printk(" (Bad address in epc)\n"); + printk(KERN_EMERG " (Bad address in epc)\n"); break; } - printk("%c%08x%c", (i?' ':'<'), insn, (i?' ':'>')); + printk(KERN_EMERG "%c%08x%c", (i?' ':'<'), insn, (i?' ':'>')); } } @@ -159,62 +159,62 @@ const int field = 2 * sizeof(unsigned long); int i; - printk("Cpu %d\n", smp_processor_id()); + printk(KERN_EMERG "Cpu %d\n", smp_processor_id()); /* * Saved main processor registers */ for (i = 0; i < 32; i++) { if ((i % 4) == 0) - printk("$%2d :", i); + printk(KERN_EMERG "$%2d :", i); if (i == 0) - printk(" %0*lx", field, 0UL); + printk(KERN_EMERG " %0*lx", field, 0UL); else if (i == 26 || i == 27) - printk(" %*s", field, ""); + printk(KERN_EMERG " %*s", field, ""); else - printk(" %0*lx", field, regs->regs[i]); + printk(KERN_EMERG " %0*lx", field, regs->regs[i]); i++; if ((i % 4) == 0) - printk("\n"); + printk(KERN_EMERG "\n"); } - printk("Hi : %0*lx\n", field, regs->hi); - printk("Lo : %0*lx\n", field, regs->lo); + printk(KERN_EMERG "Hi : %0*lx\n", field, regs->hi); + printk(KERN_EMERG "Lo : %0*lx\n", field, regs->lo); /* * Saved cp0 registers */ - printk("epc : %0*lx %s\n", field, regs->cp0_epc, print_tainted()); - printk("Status: %0*lx\n", field, regs->cp0_status); - printk("Cause : %0*lx\n", field, regs->cp0_cause); + printk(KERN_EMERG "epc : %0*lx %s\n", field, regs->cp0_epc, print_tainted()); + printk(KERN_EMERG "Status: %0*lx\n", field, regs->cp0_status); + printk(KERN_EMERG "Cause : %0*lx\n", field, regs->cp0_cause); if (regs->cp0_status & ST0_KX) - printk("KX "); + printk(KERN_EMERG "KX "); if (regs->cp0_status & ST0_SX) - printk("SX "); + printk(KERN_EMERG "SX "); if (regs->cp0_status & ST0_UX) - printk("UX "); + printk(KERN_EMERG "UX "); switch (regs->cp0_status & ST0_KSU) { case KSU_USER: - printk("USER "); + printk(KERN_EMERG "USER "); break; case KSU_SUPERVISOR: - printk("SUPERVISOR "); + printk(KERN_EMERG "SUPERVISOR "); break; case KSU_KERNEL: - printk("KERNEL "); + printk(KERN_EMERG "KERNEL "); break; default: - printk("BAD_MODE "); + printk(KERN_EMERG "BAD_MODE "); break; } if (regs->cp0_status & ST0_ERL) - printk("ERL "); + printk(KERN_EMERG "ERL "); if (regs->cp0_status & ST0_EXL) - printk("EXL "); + printk(KERN_EMERG "EXL "); if (regs->cp0_status & ST0_IE) - printk("IE "); + printk(KERN_EMERG "IE "); } void show_registers(struct pt_regs *regs) @@ -222,12 +222,12 @@ const int field = 2 * sizeof(unsigned long); show_regs(regs); - printk("Process %s (pid: %d, stackpage=%0*lx)\n", + printk(KERN_EMERG "Process %s (pid: %d, stackpage=%0*lx)\n", current->comm, current->pid, field, (unsigned long) current); show_stack(current, (long *) regs->regs[29]); show_trace(current, (long *) regs->regs[29]); show_code((unsigned int *) regs->cp0_epc); - printk("\n"); + printk(KERN_EMERG "\n"); } static spinlock_t die_lock = SPIN_LOCK_UNLOCKED; @@ -239,10 +239,10 @@ console_verbose(); spin_lock_irq(&die_lock); - printk("%s", str); + printk(KERN_EMERG "%s", str); if (file && func) - printk(" in %s:%s, line %ld", file, func, line); - printk("[#%d]:\n", ++die_counter); + printk(KERN_EMERG " in %s:%s, line %ld", file, func, line); + printk(KERN_EMERG "[#%d]:\n", ++die_counter); show_registers(regs); spin_unlock_irq(&die_lock); do_exit(SIGSEGV); @@ -700,15 +700,15 @@ unsigned int reg_val; /* For the moment, report the problem and hang. */ - printk("Cache error exception:\n"); - printk("cp0_errorepc == %0*lx\n", field, read_c0_errorepc()); + printk(KERN_EMERG "Cache error exception:\n"); + printk(KERN_EMERG "cp0_errorepc == %0*lx\n", field, read_c0_errorepc()); reg_val = read_c0_cacheerr(); - printk("c0_cacheerr == %08x\n", reg_val); + printk(KERN_EMERG "c0_cacheerr == %08x\n", reg_val); - printk("Decoded c0_cacheerr: %s cache fault in %s reference.\n", + printk(KERN_EMERG "Decoded c0_cacheerr: %s cache fault in %s reference.\n", reg_val & (1<<30) ? "secondary" : "primary", reg_val & (1<<31) ? "data" : "insn"); - printk("Error bits: %s%s%s%s%s%s%s\n", + printk(KERN_EMERG "Error bits: %s%s%s%s%s%s%s\n", reg_val & (1<<29) ? "ED " : "", reg_val & (1<<28) ? "ET " : "", reg_val & (1<<26) ? "EE " : "", @@ -716,14 +716,14 @@ reg_val & (1<<24) ? "EI " : "", reg_val & (1<<23) ? "E1 " : "", reg_val & (1<<22) ? "E0 " : ""); - printk("IDX: 0x%08x\n", reg_val & ((1<<22)-1)); + printk(KERN_EMERG "IDX: 0x%08x\n", reg_val & ((1<<22)-1)); #if defined(CONFIG_CPU_MIPS32) || defined (CONFIG_CPU_MIPS64) if (reg_val & (1<<22)) - printk("DErrAddr0: 0x%08x\n", read_c0_derraddr0()); + printk(KERN_EMERG "DErrAddr0: 0x%08x\n", read_c0_derraddr0()); if (reg_val & (1<<23)) - printk("DErrAddr1: 0x%08x\n", read_c0_derraddr1()); + printk(KERN_EMERG "DErrAddr1: 0x%08x\n", read_c0_derraddr1()); #endif panic("Can't handle the cache error!"); @@ -739,10 +739,10 @@ unsigned long depc, old_epc; unsigned int debug; - printk("SDBBP EJTAG debug exception - not handled yet, just ignored!\n"); + printk(KERN_DEBUG "SDBBP EJTAG debug exception - not handled yet, just ignored!\n"); depc = read_c0_depc(); debug = read_c0_debug(); - printk("c0_depc = %0*lx, DEBUG = %08x\n", field, depc, debug); + printk(KERN_DEBUG "c0_depc = %0*lx, DEBUG = %08x\n", field, depc, debug); if (debug & 0x80000000) { /* * In branch delay slot. @@ -760,7 +760,7 @@ write_c0_depc(depc); #if 0 - printk("\n\n----- Enable EJTAG single stepping ----\n\n"); + printk(KERN_DEBUG "\n\n----- Enable EJTAG single stepping ----\n\n"); write_c0_debug(debug | 0x100); #endif } @@ -770,7 +770,7 @@ */ void nmi_exception_handler(struct pt_regs *regs) { - printk("NMI taken!!!!\n"); + printk(KERN_EMERG "NMI taken!!!!\n"); die("NMI", regs); while(1) ; } diff -urN linux-2.6.0-test1/arch/mips64/lib/dump_tlb.c linux-2.6.0-test1-printk-mips64/arch/mips64/lib/dump_tlb.c --- linux-2.6.0-test1/arch/mips64/lib/dump_tlb.c 2003-07-13 23:36:45.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/lib/dump_tlb.c 2003-07-18 18:05:35.000000000 -0400 @@ -59,27 +59,27 @@ /* * Only print entries in use */ - printk("Index: %2d pgmask=%s ", i, msk2str(pagemask)); + printk(KERN_DEBUG "Index: %2d pgmask=%s ", i, msk2str(pagemask)); c0 = (entrylo0 >> 3) & 7; c1 = (entrylo1 >> 3) & 7; - printk("va=%011lx asid=%02lx\n", + printk(KERN_DEBUG "va=%011lx asid=%02lx\n", (entryhi & ~0x1fffUL), entryhi & 0xff); - printk("\t[pa=%011lx c=%d d=%d v=%d g=%ld] ", + printk(KERN_DEBUG "\t[pa=%011lx c=%d d=%d v=%d g=%ld] ", (entrylo0 << 6) & PAGE_MASK, c0, (entrylo0 & 4) ? 1 : 0, (entrylo0 & 2) ? 1 : 0, (entrylo0 & 1)); - printk("[pa=%011lx c=%d d=%d v=%d g=%ld]\n", + printk(KERN_DEBUG "[pa=%011lx c=%d d=%d v=%d g=%ld]\n", (entrylo1 << 6) & PAGE_MASK, c1, (entrylo1 & 4) ? 1 : 0, (entrylo1 & 2) ? 1 : 0, (entrylo1 & 1)); } } - printk("\n"); + printk(KERN_DEBUG "\n"); write_c0_entryhi(s_entryhi); write_c0_index(s_index); @@ -95,7 +95,7 @@ int wired; wired = read_c0_wired(); - printk("Wired: %d", wired); + printk(KERN_DEBUG "Wired: %d", wired); dump_tlb(0, read_c0_wired()); } @@ -122,11 +122,11 @@ local_irq_restore(flags); if (index < 0) { - printk("No entry for address 0x%08lx in TLB\n", addr); + printk(KERN_DEBUG "No entry for address 0x%08lx in TLB\n", addr); return; } - printk("Entry %d maps address 0x%08lx\n", index, addr); + printk(KERN_DEBUG "Entry %d maps address 0x%08lx\n", index, addr); dump_tlb(index, index); } @@ -145,34 +145,34 @@ addr = (unsigned long) address; - printk("Addr == %08lx\n", addr); - printk("tasks->mm.pgd == %08lx\n", (unsigned long) t->mm->pgd); + printk(KERN_DEBUG "Addr == %08lx\n", addr); + printk(KERN_DEBUG "tasks->mm.pgd == %08lx\n", (unsigned long) t->mm->pgd); page_dir = pgd_offset(t->mm, 0); - printk("page_dir == %08lx\n", (unsigned long) page_dir); + printk(KERN_DEBUG "page_dir == %08lx\n", (unsigned long) page_dir); pgd = pgd_offset(t->mm, addr); - printk("pgd == %08lx, ", (unsigned long) pgd); + printk(KERN_DEBUG "pgd == %08lx, ", (unsigned long) pgd); pmd = pmd_offset(pgd, addr); - printk("pmd == %08lx, ", (unsigned long) pmd); + printk(KERN_DEBUG "pmd == %08lx, ", (unsigned long) pmd); pte = pte_offset(pmd, addr); - printk("pte == %08lx, ", (unsigned long) pte); + printk(KERN_DEBUG "pte == %08lx, ", (unsigned long) pte); page = *pte; - printk("page == %08lx\n", pte_val(page)); + printk(KERN_DEBUG "page == %08lx\n", pte_val(page)); val = pte_val(page); - if (val & _PAGE_PRESENT) printk("present "); - if (val & _PAGE_READ) printk("read "); - if (val & _PAGE_WRITE) printk("write "); - if (val & _PAGE_ACCESSED) printk("accessed "); - if (val & _PAGE_MODIFIED) printk("modified "); - if (val & _PAGE_R4KBUG) printk("r4kbug "); - if (val & _PAGE_GLOBAL) printk("global "); - if (val & _PAGE_VALID) printk("valid "); - printk("\n"); + if (val & _PAGE_PRESENT) printk(KERN_DEBUG "present "); + if (val & _PAGE_READ) printk(KERN_DEBUG "read "); + if (val & _PAGE_WRITE) printk(KERN_DEBUG "write "); + if (val & _PAGE_ACCESSED) printk(KERN_DEBUG "accessed "); + if (val & _PAGE_MODIFIED) printk(KERN_DEBUG "modified "); + if (val & _PAGE_R4KBUG) printk(KERN_DEBUG "r4kbug "); + if (val & _PAGE_GLOBAL) printk(KERN_DEBUG "global "); + if (val & _PAGE_VALID) printk(KERN_DEBUG "valid "); + printk(KERN_DEBUG "\n"); } void dump_list_current(void *address) @@ -202,10 +202,10 @@ int i; for(i = 0; i < 8; i++) { - printk("*%08lx == %08lx, ", + printk(KERN_DEBUG "*%08lx == %08lx, ", (unsigned long)p, (unsigned long)*p); p++; - printk("*%08lx == %08lx\n", + printk(KERN_DEBUG "*%08lx == %08lx\n", (unsigned long)p, (unsigned long)*p); p++; } diff -urN linux-2.6.0-test1/arch/mips64/mm/c-r4k.c linux-2.6.0-test1-printk-mips64/arch/mips64/mm/c-r4k.c --- linux-2.6.0-test1/arch/mips64/mm/c-r4k.c 2003-07-13 23:31:52.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/mm/c-r4k.c 2003-07-18 17:58:48.000000000 -0400 @@ -880,12 +880,12 @@ break; } - printk("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n", + printk(KERN_INFO "Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n", icache_size >> 10, cpu_has_vtag_icache ? "virtually tagged" : "physically tagged", way_string[c->icache.ways], c->icache.linesz); - printk("Primary data cache %ldkB %s, linesize %d bytes.\n", + printk(KERN_INFO "Primary data cache %ldkB %s, linesize %d bytes.\n", dcache_size >> 10, way_string[c->dcache.ways], c->dcache.linesz); } @@ -1083,7 +1083,7 @@ !(current_cpu_data.scache.flags & MIPS_CACHE_NOT_PRESENT)) panic("Dunno how to handle MIPS32 / MIPS64 second level cache"); - printk("Unified secondary cache %ldkB %s, linesize %d bytes.\n", + printk(KERN_INFO "Unified secondary cache %ldkB %s, linesize %d bytes.\n", scache_size >> 10, way_string[c->scache.ways], c->scache.linesz); current_cpu_data.options |= MIPS_CPU_SUBSET_CACHES; diff -urN linux-2.6.0-test1/arch/mips64/mm/fault.c linux-2.6.0-test1-printk-mips64/arch/mips64/mm/fault.c --- linux-2.6.0-test1/arch/mips64/mm/fault.c 2003-07-13 23:34:42.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/mm/fault.c 2003-07-18 18:01:51.000000000 -0400 @@ -59,7 +59,7 @@ * a poke. Hold onto your hats... */ console_loglevel = 15; /* NMI oopser may have shut the console up */ - printk(" "); + printk(KERN_WARNING " "); console_loglevel = loglevel_save; } @@ -78,7 +78,7 @@ siginfo_t info; #if 0 - printk("Cpu%d[%s:%d:%08lx:%ld:%08lx]\n", smp_processor_id(), + printk(KERN_NOTICE "Cpu%d[%s:%d:%08lx:%ld:%08lx]\n", smp_processor_id(), current->comm, current->pid, address, write, regs->cp0_epc); #endif @@ -163,7 +163,7 @@ tsk->thread.cp0_badvaddr = address; tsk->thread.error_code = write; #if 0 - printk("do_page_fault() #2: sending SIGSEGV to %s for illegal %s\n" + printk(KERN_NOTICE "do_page_fault() #2: sending SIGSEGV to %s for illegal %s\n" "%08lx (epc == %08lx, ra == %08lx)\n", tsk->comm, write ? "write access to" : "read access from", @@ -216,7 +216,7 @@ down_read(&mm->mmap_sem); goto survive; } - printk("VM: killing process %s\n", tsk->comm); + printk(KERN_WARNING "VM: killing process %s\n", tsk->comm); if (user_mode(regs)) do_exit(SIGKILL); goto no_context; diff -urN linux-2.6.0-test1/arch/mips64/mm/pgtable.c linux-2.6.0-test1-printk-mips64/arch/mips64/mm/pgtable.c --- linux-2.6.0-test1/arch/mips64/mm/pgtable.c 2003-07-13 23:32:42.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/mm/pgtable.c 2003-07-18 17:59:58.000000000 -0400 @@ -9,9 +9,9 @@ int highmem = 0; struct page *page; - printk("Mem-info:\n"); + printk(KERN_INFO "Mem-info:\n"); show_free_areas(); - printk("Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); + printk(KERN_INFO "Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); pfn = max_mapnr; while (pfn-- > 0) { page = pfn_to_page(pfn); @@ -25,9 +25,9 @@ else if (page_count(page)) shared += page_count(page) - 1; } - printk("%d pages of RAM\n", total); - printk("%d pages of HIGHMEM\n",highmem); - printk("%d reserved pages\n",reserved); - printk("%d pages shared\n",shared); - printk("%d pages swap cached\n",cached); + printk(KERN_INFO "%d pages of RAM\n", total); + printk(KERN_INFO "%d pages of HIGHMEM\n",highmem); + printk(KERN_INFO "%d reserved pages\n",reserved); + printk(KERN_INFO "%d pages shared\n",shared); + printk(KERN_INFO "%d pages swap cached\n",cached); } diff -urN linux-2.6.0-test1/arch/mips64/mm/sc-ip22.c linux-2.6.0-test1-printk-mips64/arch/mips64/mm/sc-ip22.c --- linux-2.6.0-test1/arch/mips64/mm/sc-ip22.c 2003-07-13 23:28:55.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/mm/sc-ip22.c 2003-07-18 17:58:09.000000000 -0400 @@ -62,7 +62,7 @@ unsigned int flags; #ifdef DEBUG_CACHE - printk("indy_sc_wback_invalidate[%08lx,%08lx]", addr, size); + printk(KERN_DEBUG "indy_sc_wback_invalidate[%08lx,%08lx]", addr, size); #endif if (!size) @@ -90,7 +90,7 @@ /* This is really cool... */ #ifdef DEBUG_CACHE - printk("Enabling R4600 SCACHE\n"); + printk(KERN_DEBUG "Enabling R4600 SCACHE\n"); #endif __asm__ __volatile__( ".set\tpush\n\t" @@ -120,7 +120,7 @@ unsigned long tmp1, tmp2, tmp3; #ifdef DEBUG_CACHE - printk("Disabling R4600 SCACHE\n"); + printk(KERN_DEBUG "Disabling R4600 SCACHE\n"); #endif __asm__ __volatile__( ".set\tpush\n\t" diff -urN linux-2.6.0-test1/arch/mips64/mm/sc-r5k.c linux-2.6.0-test1-printk-mips64/arch/mips64/mm/sc-r5k.c --- linux-2.6.0-test1/arch/mips64/mm/sc-r5k.c 2003-07-13 23:33:53.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/mm/sc-r5k.c 2003-07-18 18:00:39.000000000 -0400 @@ -93,7 +93,7 @@ scache_size = (512 * 1024) << ((config & R5K_CONF_SS) >> 20); - printk("R5000 SCACHE size %ldkB, linesize 32 bytes.\n", + printk(KERN_INFO "R5000 SCACHE size %ldkB, linesize 32 bytes.\n", scache_size >> 10); return 1; diff -urN linux-2.6.0-test1/arch/mips64/mm/sc-rm7k.c linux-2.6.0-test1-printk-mips64/arch/mips64/mm/sc-rm7k.c --- linux-2.6.0-test1/arch/mips64/mm/sc-rm7k.c 2003-07-13 23:33:46.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/mm/sc-rm7k.c 2003-07-18 18:00:28.000000000 -0400 @@ -35,7 +35,7 @@ unsigned long end, a; #ifdef DEBUG_CACHE - printk("rm7k_sc_wback_inv[%08lx,%08lx]", addr, size); + printk(KERN_DEBUG "rm7k_sc_wback_inv[%08lx,%08lx]", addr, size); #endif a = addr & ~(sc_lsize - 1); @@ -65,7 +65,7 @@ unsigned long end, a; #ifdef DEBUG_CACHE - printk("rm7k_sc_inv[%08lx,%08lx]", addr, size); + printk(KERN_DEBUG "rm7k_sc_inv[%08lx,%08lx]", addr, size); #endif a = addr & ~(sc_lsize - 1); @@ -148,7 +148,7 @@ printk(KERN_INFO "Enabling secondary cache..."); func(); - printk(" done\n"); + printk(KERN_INFO " done\n"); /* * While we're at it let's deal with the tertiary cache. diff -urN linux-2.6.0-test1/arch/mips64/mm/tlb-r4k.c linux-2.6.0-test1-printk-mips64/arch/mips64/mm/tlb-r4k.c --- linux-2.6.0-test1/arch/mips64/mm/tlb-r4k.c 2003-07-13 23:37:58.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/mm/tlb-r4k.c 2003-07-18 18:02:41.000000000 -0400 @@ -47,7 +47,7 @@ int entry; #ifdef DEBUG_TLB - printk("[tlball]"); + printk(KERN_DEBUG "[tlball]"); #endif local_irq_save(flags); @@ -81,7 +81,7 @@ if (cpu_context(cpu, mm) != 0) { #ifdef DEBUG_TLB - printk("[tlbmm<%d>]", cpu_context(cpu, mm)); + printk(KERN_DEBUG "[tlbmm<%d>]", cpu_context(cpu, mm)); #endif drop_mmu_context(mm,cpu); } @@ -98,7 +98,7 @@ int size; #ifdef DEBUG_TLB - printk("[tlbrange<%02x,%08lx,%08lx>]", cpu_context(cpu, mm) & ASID_MASK, + printk(KERN_DEBUG "[tlbrange<%02x,%08lx,%08lx>]", cpu_context(cpu, mm) & ASID_MASK, start, end); #endif local_irq_save(flags); @@ -144,7 +144,7 @@ int size; #ifdef DEBUG_TLB - printk("[tlbkernelrange<%08lx,%08lx>]", start, end); + printk(KERN_DEBUG "[tlbkernelrange<%08lx,%08lx>]", start, end); #endif local_irq_save(flags); size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; @@ -191,7 +191,7 @@ unsigned long oldpid, newpid, idx; #ifdef DEBUG_TLB - printk("[tlbpage<%d,%08lx>]", cpu_asid(cpu, vma->vm_mm), page); + printk(KERN_DEBUG "[tlbpage<%d,%08lx>]", cpu_asid(cpu, vma->vm_mm), page); #endif newpid = cpu_asid(cpu, vma->vm_mm); page &= (PAGE_MASK << 1); @@ -270,7 +270,7 @@ #ifdef DEBUG_TLB if ((pid != cpu_asid(smp_processor_id(), vma->vm_mm))) || (cpu_context(smp_processor_id(), vma->vm_mm) == 0)) { - printk("update_mmu_cache: Wheee, bogus tlbpid mmpid=%d " + printk(KERN_DEBUG "update_mmu_cache: Wheee, bogus tlbpid mmpid=%d " "tlbpid=%d\n", (int) cpu_asid(smp_processor_id(), vma->vm_mm), pid); } @@ -397,7 +397,7 @@ current_cpu_data.tlbsize = ((config1 >> 25) & 0x3f) + 1; } - printk("Number of TLB entries %d.\n", current_cpu_data.tlbsize); + printk(KERN_INFO "Number of TLB entries %d.\n", current_cpu_data.tlbsize); } void __init r4k_tlb_init(void) diff -urN linux-2.6.0-test1/arch/mips64/mm/tlb-sb1.c linux-2.6.0-test1-printk-mips64/arch/mips64/mm/tlb-sb1.c --- linux-2.6.0-test1/arch/mips64/mm/tlb-sb1.c 2003-07-13 23:39:33.000000000 -0400 +++ linux-2.6.0-test1-printk-mips64/arch/mips64/mm/tlb-sb1.c 2003-07-18 18:04:23.000000000 -0400 @@ -55,7 +55,7 @@ "=r" (entrylo1hi), "=r" (entrylo1lo), "=r" (pagemask)); - printk("%08X%08X %08X%08X %08X%08X %08X", + printk(KERN_ALERT "%08X%08X %08X%08X %08X%08X %08X", entryhihi, entryhilo, entrylo0hi, entrylo0lo, entrylo1hi, entrylo1lo, @@ -69,20 +69,20 @@ int entry; local_irq_save(flags); old_ctx = read_c0_entryhi(); - printk("Current TLB registers state:\n" + printk(KERN_ALERT "Current TLB registers state:\n" " EntryHi EntryLo0 EntryLo1 PageMask Index\n" "--------------------------------------------------------------------\n"); dump_cur_tlb_regs(); - printk(" %08X\n", read_c0_index()); - printk("\n\nFull TLB Dump:\n" + printk(KERN_ALERT " %08X\n", read_c0_index()); + printk(KERN_ALERT "\n\nFull TLB Dump:\n" "Idx EntryHi EntryLo0 EntryLo1 PageMask\n" "--------------------------------------------------------------\n"); for (entry = 0; entry < current_cpu_data.tlbsize; entry++) { write_c0_index(entry); - printk("\n%02i ", entry); + printk(KERN_ALERT "\n%02i ", entry); dump_cur_tlb_regs(); } - printk("\n"); + printk(KERN_ALERT "\n"); write_c0_entryhi(old_ctx); local_irq_restore(flags); }