Commit 4eee1e72 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

m68k/sun3x: Modernize printing of kernel messages

  - Convert from printk() to pr_*(),
  - Remove #undef DEBUG,
  - Drop useless Warning prefix,
  - Use TABs for indentation while at it.
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 56bbd862
...@@ -48,7 +48,7 @@ static unsigned char sun3x_82072_fd_inb(int port) ...@@ -48,7 +48,7 @@ static unsigned char sun3x_82072_fd_inb(int port)
// udelay(5); // udelay(5);
switch(port & 7) { switch(port & 7) {
default: default:
printk("floppy: Asked to read unknown port %d\n", port); pr_crit("floppy: Asked to read unknown port %d\n", port);
panic("floppy: Port bolixed."); panic("floppy: Port bolixed.");
case 4: /* FD_STATUS */ case 4: /* FD_STATUS */
return (*sun3x_fdc.status_r) & ~STATUS_DMA; return (*sun3x_fdc.status_r) & ~STATUS_DMA;
...@@ -70,7 +70,7 @@ static void sun3x_82072_fd_outb(unsigned char value, int port) ...@@ -70,7 +70,7 @@ static void sun3x_82072_fd_outb(unsigned char value, int port)
// udelay(5); // udelay(5);
switch(port & 7) { switch(port & 7) {
default: default:
printk("floppy: Asked to write to unknown port %d\n", port); pr_crit("floppy: Asked to write to unknown port %d\n", port);
panic("floppy: Port bolixed."); panic("floppy: Port bolixed.");
case 2: /* FD_DOR */ case 2: /* FD_DOR */
/* Oh geese, 82072 on the Sun has no DOR register, /* Oh geese, 82072 on the Sun has no DOR register,
...@@ -127,7 +127,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id) ...@@ -127,7 +127,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
// printk("doing pdma\n");// st %x\n", sun_fdc->status_82072); // pr_info("doing pdma\n");// st %x\n", sun_fdc->status_82072);
#ifdef TRACE_FLPY_INT #ifdef TRACE_FLPY_INT
if(!calls) if(!calls)
...@@ -171,7 +171,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id) ...@@ -171,7 +171,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id)
#ifdef TRACE_FLPY_INT #ifdef TRACE_FLPY_INT
calls++; calls++;
#endif #endif
// printk("st=%02x\n", st); // pr_info("st=%02x\n", st);
if(st == 0x20) if(st == 0x20)
return IRQ_HANDLED; return IRQ_HANDLED;
if(!(st & 0x20)) { if(!(st & 0x20)) {
...@@ -180,7 +180,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id) ...@@ -180,7 +180,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id)
doing_pdma = 0; doing_pdma = 0;
#ifdef TRACE_FLPY_INT #ifdef TRACE_FLPY_INT
printk("count=%x, residue=%x calls=%d bytes=%x dma_wait=%d\n", pr_info("count=%x, residue=%x calls=%d bytes=%x dma_wait=%d\n",
virtual_dma_count, virtual_dma_residue, calls, bytes, virtual_dma_count, virtual_dma_residue, calls, bytes,
dma_wait); dma_wait);
calls = 0; calls = 0;
......
...@@ -58,8 +58,6 @@ static volatile unsigned long *iommu_pte = (unsigned long *)SUN3X_IOMMU; ...@@ -58,8 +58,6 @@ static volatile unsigned long *iommu_pte = (unsigned long *)SUN3X_IOMMU;
((addr & 0x03c00000) >> \ ((addr & 0x03c00000) >> \
(DVMA_PAGE_SHIFT+4))) (DVMA_PAGE_SHIFT+4)))
#undef DEBUG
#ifdef DEBUG #ifdef DEBUG
/* code to print out a dvma mapping for debugging purposes */ /* code to print out a dvma mapping for debugging purposes */
void dvma_print (unsigned long dvma_addr) void dvma_print (unsigned long dvma_addr)
...@@ -69,10 +67,8 @@ void dvma_print (unsigned long dvma_addr) ...@@ -69,10 +67,8 @@ void dvma_print (unsigned long dvma_addr)
index = dvma_addr >> DVMA_PAGE_SHIFT; index = dvma_addr >> DVMA_PAGE_SHIFT;
printk("idx %lx dvma_addr %08lx paddr %08lx\n", index, dvma_addr, pr_info("idx %lx dvma_addr %08lx paddr %08lx\n", index, dvma_addr,
dvma_entry_paddr(index)); dvma_entry_paddr(index));
} }
#endif #endif
...@@ -91,10 +87,7 @@ inline int dvma_map_cpu(unsigned long kaddr, ...@@ -91,10 +87,7 @@ inline int dvma_map_cpu(unsigned long kaddr,
end = PAGE_ALIGN(vaddr + len); end = PAGE_ALIGN(vaddr + len);
#ifdef DEBUG pr_debug("dvma: mapping kern %08lx to virt %08lx\n", kaddr, vaddr);
printk("dvma: mapping kern %08lx to virt %08lx\n",
kaddr, vaddr);
#endif
pgd = pgd_offset_k(vaddr); pgd = pgd_offset_k(vaddr);
do { do {
...@@ -126,10 +119,8 @@ inline int dvma_map_cpu(unsigned long kaddr, ...@@ -126,10 +119,8 @@ inline int dvma_map_cpu(unsigned long kaddr,
end3 = end2; end3 = end2;
do { do {
#ifdef DEBUG pr_debug("mapping %08lx phys to %08lx\n",
printk("mapping %08lx phys to %08lx\n",
__pa(kaddr), vaddr); __pa(kaddr), vaddr);
#endif
set_pte(pte, pfn_pte(virt_to_pfn(kaddr), set_pte(pte, pfn_pte(virt_to_pfn(kaddr),
PAGE_KERNEL)); PAGE_KERNEL));
pte++; pte++;
...@@ -162,7 +153,8 @@ inline int dvma_map_iommu(unsigned long kaddr, unsigned long baddr, ...@@ -162,7 +153,8 @@ inline int dvma_map_iommu(unsigned long kaddr, unsigned long baddr,
for(; index < end ; index++) { for(; index < end ; index++) {
// if(dvma_entry_use(index)) // if(dvma_entry_use(index))
// BUG(); // BUG();
// printk("mapping pa %lx to ba %lx\n", __pa(kaddr), index << DVMA_PAGE_SHIFT); // pr_info("mapping pa %lx to ba %lx\n", __pa(kaddr),
// index << DVMA_PAGE_SHIFT);
dvma_entry_set(index, __pa(kaddr)); dvma_entry_set(index, __pa(kaddr));
...@@ -190,12 +182,11 @@ void dvma_unmap_iommu(unsigned long baddr, int len) ...@@ -190,12 +182,11 @@ void dvma_unmap_iommu(unsigned long baddr, int len)
end = (DVMA_PAGE_ALIGN(baddr+len) >> DVMA_PAGE_SHIFT); end = (DVMA_PAGE_ALIGN(baddr+len) >> DVMA_PAGE_SHIFT);
for(; index < end ; index++) { for(; index < end ; index++) {
#ifdef DEBUG pr_debug("freeing bus mapping %08x\n",
printk("freeing bus mapping %08x\n", index << DVMA_PAGE_SHIFT); index << DVMA_PAGE_SHIFT);
#endif
#if 0 #if 0
if(!dvma_entry_use(index)) if(!dvma_entry_use(index))
printk("dvma_unmap freeing unused entry %04x\n", pr_info("dvma_unmap freeing unused entry %04x\n",
index); index);
else else
dvma_entry_dec(index); dvma_entry_dec(index);
......
...@@ -106,9 +106,9 @@ void __init sun3x_prom_init(void) ...@@ -106,9 +106,9 @@ void __init sun3x_prom_init(void)
idprom_init(); idprom_init();
if (!((idprom->id_machtype & SM_ARCH_MASK) == SM_SUN3X)) { if (!((idprom->id_machtype & SM_ARCH_MASK) == SM_SUN3X)) {
printk("Warning: machine reports strange type %02x\n", pr_warn("Machine reports strange type %02x\n",
idprom->id_machtype); idprom->id_machtype);
printk("Pretending it's a 3/80, but very afraid...\n"); pr_warn("Pretending it's a 3/80, but very afraid...\n");
idprom->id_machtype = SM_SUN3X | SM_3_80; idprom->id_machtype = SM_SUN3X | SM_3_80;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment