[PATCH] arch/alpha/kernel/*: use KERN_* From: Christophe Lucas printk() calls should include appropriate KERN_* constant. Signed-off-by: Christophe Lucas Index: linux-kj/arch/alpha/kernel/core_cia.c =================================================================== --- linux-kj.orig/arch/alpha/kernel/core_cia.c 2005-09-21 01:19:05.000000000 +0400 +++ linux-kj/arch/alpha/kernel/core_cia.c 2005-09-21 01:51:50.000000000 +0400 @@ -428,7 +428,7 @@ verify_tb_operation(void) mcheck_expected(0) = 0; mb(); if (mcheck_taken(0)) { - printk("pci: failed sg loopback i/o read test (mcheck)\n"); + printk(KERN_WARNING "pci: failed sg loopback i/o read test (mcheck)\n"); goto failed; } if (temp != data0) { @@ -445,9 +445,9 @@ verify_tb_operation(void) temp = *(vip)CIA_IOC_TB_TAGn(0); if (temp & 1) { use_tbia_try2 = 1; - printk("pci: failed tbia test; workaround available\n"); + printk(KERN_WARNING "pci: failed tbia test; workaround available\n"); } else { - printk("pci: passed tbia test\n"); + printk(KERN_INFO "pci: passed tbia test\n"); } } @@ -465,7 +465,7 @@ verify_tb_operation(void) mcheck_expected(0) = 0; mb(); if (mcheck_taken(0)) { - printk("pci: failed pte write cache snoop test (mcheck)\n"); + printk(KERN_WARNING "pci: failed pte write cache snoop test (mcheck)\n"); goto failed; } if (temp != data0) { @@ -512,7 +512,7 @@ verify_tb_operation(void) mb(); mcheck_expected(0) = 0; mb(); - printk("pci: %s pci machine check test\n", + printk(KERN_INFO "pci: %s pci machine check test\n", mcheck_taken(0) ? "passed" : "failed"); /* Clean up after the tests. */ @@ -529,7 +529,7 @@ verify_tb_operation(void) *(vip)CIA_IOC_TB_TAGn(2) = 2; *(vip)CIA_IOC_TB_TAGn(3) = 2; - printk("pci: tbia workaround enabled\n"); + printk(KERN_INFO "pci: tbia workaround enabled\n"); } alpha_mv.mv_pci_tbi(arena->hose, 0, -1); @@ -546,7 +546,7 @@ exit: return; failed: - printk("pci: disabling sg translation window\n"); + printk(KERN_INFO "pci: disabling sg translation window\n"); *(vip)CIA_IOC_PCI_W0_BASE = 0; *(vip)CIA_IOC_PCI_W1_BASE = 0; pci_isa_hose->sg_isa = NULL; @@ -632,7 +632,7 @@ do_init_arch(int is_pyxis) int temp, cia_rev, tbia_window; cia_rev = *(vip)CIA_IOC_CIA_REV & CIA_REV_MASK; - printk("pci: cia revision %d%s\n", + printk(KERN_INFO "pci: cia revision %d%s\n", cia_rev, is_pyxis ? " (pyxis)" : ""); if (alpha_using_srm) Index: linux-kj/arch/alpha/kernel/core_irongate.c =================================================================== --- linux-kj.orig/arch/alpha/kernel/core_irongate.c 2005-09-21 01:19:05.000000000 +0400 +++ linux-kj/arch/alpha/kernel/core_irongate.c 2005-09-21 01:51:50.000000000 +0400 @@ -169,13 +169,13 @@ irongate_pci_clr_err(void) again: IRONGATE_jd = IRONGATE0->stat_cmd; - printk("Iron stat_cmd %x\n", IRONGATE_jd); + printk(KERN_INFO "Iron stat_cmd %x\n", IRONGATE_jd); IRONGATE0->stat_cmd = IRONGATE_jd; /* write again clears error bits */ mb(); IRONGATE_jd = IRONGATE0->stat_cmd; /* re-read to force write */ IRONGATE_jd = *IronECC; - printk("Iron ECC %x\n", IRONGATE_jd); + printk(KERN_INFO "Iron ECC %x\n", IRONGATE_jd); *IronECC = IRONGATE_jd; /* write again clears error bits */ mb(); IRONGATE_jd = *IronECC; /* re-read to force write */ @@ -351,7 +351,7 @@ irongate_ioremap(unsigned long addr, uns * Adjust the limits (mappings must be page aligned) */ if (addr & ~PAGE_MASK) { - printk("AGP ioremap failed... addr not page aligned (0x%lx)\n", + printk(KERN_WARNING "AGP ioremap failed... addr not page aligned (0x%lx)\n", addr); return (void __iomem *)(addr + IRONGATE_MEM); } @@ -359,17 +359,17 @@ irongate_ioremap(unsigned long addr, uns size = PAGE_ALIGN(last) - addr; #if 0 - printk("irongate_ioremap(0x%lx, 0x%lx)\n", addr, size); - printk("irongate_ioremap: gart_bus_addr 0x%lx\n", gart_bus_addr); - printk("irongate_ioremap: gart_aper_size 0x%lx\n", gart_aper_size); - printk("irongate_ioremap: mmio_regs %p\n", mmio_regs); - printk("irongate_ioremap: gatt_pages %p\n", gatt_pages); + printk(KERN_DEBUG "irongate_ioremap(0x%lx, 0x%lx)\n", addr, size); + printk(KERN_DEBUG "irongate_ioremap: gart_bus_addr 0x%lx\n", gart_bus_addr); + printk(KERN_DEBUG "irongate_ioremap: gart_aper_size 0x%lx\n", gart_aper_size); + printk(KERN_DEBUG "irongate_ioremap: mmio_regs %p\n", mmio_regs); + printk(KERN_DEBUG "irongate_ioremap: gatt_pages %p\n", gatt_pages); for(baddr = addr; baddr <= last; baddr += PAGE_SIZE) { cur_gatt = phys_to_virt(GET_GATT(baddr) & ~1); pte = cur_gatt[GET_GATT_OFF(baddr)] & ~1; - printk("irongate_ioremap: cur_gatt %p pte 0x%x\n", + printk(KERN_DEBUG "irongate_ioremap: cur_gatt %p pte 0x%x\n", cur_gatt, pte); } #endif @@ -389,7 +389,7 @@ irongate_ioremap(unsigned long addr, uns if (__alpha_remap_area_pages(vaddr, pte, PAGE_SIZE, 0)) { - printk("AGP ioremap: FAILED to map...\n"); + printk(KERN_WARNING "AGP ioremap: FAILED to map...\n"); vfree(area->addr); return NULL; } @@ -399,7 +399,7 @@ irongate_ioremap(unsigned long addr, uns vaddr = (unsigned long)area->addr + (addr & ~PAGE_MASK); #if 0 - printk("irongate_ioremap(0x%lx, 0x%lx) returning 0x%lx\n", + printk(KERN_DEBUG "irongate_ioremap(0x%lx, 0x%lx) returning 0x%lx\n", addr, size, vaddr); #endif return (void __iomem *)vaddr; Index: linux-kj/arch/alpha/kernel/core_lca.c =================================================================== --- linux-kj.orig/arch/alpha/kernel/core_lca.c 2005-09-21 01:19:05.000000000 +0400 +++ linux-kj/arch/alpha/kernel/core_lca.c 2005-09-21 01:51:50.000000000 +0400 @@ -334,23 +334,23 @@ lca_init_arch(void) static void mem_error(unsigned long esr, unsigned long ear) { - printk(" %s %s error to %s occurred at address %x\n", + printk(KERN_ERR " %s %s error to %s occurred at address %x\n", ((esr & ESR_CEE) ? "Correctable" : (esr & ESR_UEE) ? "Uncorrectable" : "A"), (esr & ESR_WRE) ? "write" : "read", (esr & ESR_SOR) ? "memory" : "b-cache", (unsigned) (ear & 0x1ffffff8)); if (esr & ESR_CTE) { - printk(" A b-cache tag parity error was detected.\n"); + printk(KERN_ERR " A b-cache tag parity error was detected.\n"); } if (esr & ESR_MSE) { - printk(" Several other correctable errors occurred.\n"); + printk(KERN_ERR " Several other correctable errors occurred.\n"); } if (esr & ESR_MHE) { - printk(" Several other uncorrectable errors occurred.\n"); + printk(KERN_ERR " Several other uncorrectable errors occurred.\n"); } if (esr & ESR_NXM) { - printk(" Attempted to access non-existent memory.\n"); + printk(KERN_ERR " Attempted to access non-existent memory.\n"); } } @@ -372,16 +372,16 @@ ioc_error(__u32 stat0, __u32 stat1) unsigned code = (stat0 & IOC_CODE) >> IOC_CODE_SHIFT; unsigned cmd = (stat0 & IOC_CMD) >> IOC_CMD_SHIFT; - printk(" %s initiated PCI %s cycle to address %x" + printk(KERN_ERR " %s initiated PCI %s cycle to address %x" " failed due to %s.\n", code > 3 ? "PCI" : "CPU", pci_cmd[cmd], stat1, err_name[code]); if (code == 5 || code == 6) { - printk(" (Error occurred at PCI memory address %x.)\n", + printk(KERN_ERR " (Error occurred at PCI memory address %x.)\n", (stat0 & ~IOC_P_NBR)); } if (stat0 & IOC_LOST) { - printk(" Other PCI errors occurred simultaneously.\n"); + printk(KERN_ERR " Other PCI errors occurred simultaneously.\n"); } } @@ -482,12 +482,12 @@ lca_clock_print(void) pmr_reg = LCA_READ_PMR; - printk("Status of clock control:\n"); - printk("\tPrimary clock divisor\t0x%lx\n", LCA_GET_PRIMARY(pmr_reg)); - printk("\tOverride clock divisor\t0x%lx\n", LCA_GET_OVERRIDE(pmr_reg)); - printk("\tInterrupt override is %s\n", + printk(KERN_INFO "Status of clock control:\n"); + printk(KERN_INFO "\tPrimary clock divisor\t0x%lx\n", LCA_GET_PRIMARY(pmr_reg)); + printk(KERN_INFO "\tOverride clock divisor\t0x%lx\n", LCA_GET_OVERRIDE(pmr_reg)); + printk(KERN_INFO "\tInterrupt override is %s\n", (pmr_reg & LCA_PMR_INTO) ? "on" : "off"); - printk("\tDMA override is %s\n", + printk(KERN_INFO "\tDMA override is %s\n", (pmr_reg & LCA_PMR_DMAO) ? "on" : "off"); } Index: linux-kj/arch/alpha/kernel/core_marvel.c =================================================================== --- linux-kj.orig/arch/alpha/kernel/core_marvel.c 2005-09-21 01:19:05.000000000 +0400 +++ linux-kj/arch/alpha/kernel/core_marvel.c 2005-09-21 01:51:50.000000000 +0400 @@ -332,7 +332,7 @@ marvel_init_io7(struct io7 *io7) { int i; - printk("Initializing IO7 at PID %d\n", io7->pe); + printk(KERN_INFO "Initializing IO7 at PID %d\n", io7->pe); /* * Get the Port 7 CSR pointer. @@ -361,7 +361,7 @@ marvel_io7_present(gct6_node *node) return; pe = (node->id >> 8) & 0xff; - printk("Found an IO7 at PID %d\n", pe); + printk(KERN_INFO "Found an IO7 at PID %d\n", pe); alloc_io7(pe); } @@ -383,7 +383,7 @@ marvel_init_vga_hose(void) * need to fix this decode when the console * changes its encoding */ - printk("console graphics is on hose %d (console)\n", h); + printk(KERN_INFO "console graphics is on hose %d (console)\n", h); /* * The console's hose numbering is: @@ -399,7 +399,7 @@ marvel_init_vga_hose(void) hose = io7->ports[port].hose; if (hose) { - printk("Console graphics on hose %d\n", hose->index); + printk(KERN_INFO "Console graphics on hose %d\n", hose->index); pci_vga_hose = hose; } } @@ -426,7 +426,7 @@ marvel_specify_io7(char *str) do { pid = simple_strtoul(str, &pchar, 0); if (pchar != str) { - printk("User-specified IO7 at PID %lu\n", pid); + printk(KERN_INFO "User-specified IO7 at PID %lu\n", pid); io7 = alloc_io7(pid); if (io7) marvel_init_io7(io7); } @@ -759,7 +759,7 @@ marvel_ioremap(unsigned long addr, unsig baddr += PAGE_SIZE, vaddr += PAGE_SIZE) { pfn = ptes[baddr >> PAGE_SHIFT]; if (!(pfn & 1)) { - printk("ioremap failed... pte not valid...\n"); + printk(KERN_ERR "ioremap failed... pte not valid...\n"); vfree(area->addr); return NULL; } @@ -768,7 +768,7 @@ marvel_ioremap(unsigned long addr, unsig if (__alpha_remap_area_pages(vaddr, pfn << PAGE_SHIFT, PAGE_SIZE, 0)) { - printk("FAILED to map...\n"); + printk(KERN_ERR "FAILED to map...\n"); vfree(area->addr); return NULL; } @@ -1002,7 +1002,7 @@ marvel_agp_configure(alpha_agp_info *agp * Don't know what this PLL setting is, take the requested * rate, but warn the user. */ - printk("%s: unknown PLL setting RNGB=%lx (PLL6_CTL=%016lx)\n", + printk(KERN_INFO "%s: unknown PLL setting RNGB=%lx (PLL6_CTL=%016lx)\n", __FUNCTION__, IO7_PLL_RNGB(agp_pll), agp_pll); break; } @@ -1011,7 +1011,7 @@ marvel_agp_configure(alpha_agp_info *agp * Set the new rate, if necessary. */ if (new_rate) { - printk("Requested AGP Rate %dX not compatible " + printk(KERN_INFO "Requested AGP Rate %dX not compatible " "with PLL setting - using %dX\n", agp->mode.bits.rate, new_rate); @@ -1019,7 +1019,7 @@ marvel_agp_configure(alpha_agp_info *agp agp->mode.bits.rate = new_rate; } - printk("Enabling AGP on hose %d: %dX%s RQ %d\n", + printk(KERN_INFO "Enabling AGP on hose %d: %dX%s RQ %d\n", agp->hose->index, agp->mode.bits.rate, agp->mode.bits.sba ? " - SBA" : "", agp->mode.bits.rq); @@ -1053,13 +1053,13 @@ marvel_agp_translate(alpha_agp_info *agp if (addr < agp->aperture.bus_base || addr >= agp->aperture.bus_base + agp->aperture.size) { - printk("%s: addr out of range\n", __FUNCTION__); + printk(KERN_ERR "%s: addr out of range\n", __FUNCTION__); return -EINVAL; } pte = aper->arena->ptes[baddr >> PAGE_SHIFT]; if (!(pte & 1)) { - printk("%s: pte not valid\n", __FUNCTION__); + printk(KERN_ERR "%s: pte not valid\n", __FUNCTION__); return -EINVAL; } return (pte >> 1) << PAGE_SHIFT; @@ -1109,7 +1109,7 @@ marvel_agp_info(void) if (!hose || !hose->sg_pci) return NULL; - printk("MARVEL - using hose %d as AGP\n", hose->index); + printk(KERN_INFO "MARVEL - using hose %d as AGP\n", hose->index); /* * Get the csrs from the hose.