Commit c130d3be authored by Max Filippov's avatar Max Filippov

xtensa: clean up custom-controlled debug output

Replace #ifdef'fed/commented out debug printk statements with pr_debug.
Replace printk statements with pr_* equivalents.
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 40d1a07b
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/cache.h> #include <linux/cache.h>
#undef DEBUG_RELOCATE
static int static int
decode_calln_opcode (unsigned char *location) decode_calln_opcode (unsigned char *location)
{ {
...@@ -58,10 +56,9 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, ...@@ -58,10 +56,9 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
unsigned char *location; unsigned char *location;
uint32_t value; uint32_t value;
#ifdef DEBUG_RELOCATE pr_debug("Applying relocate section %u to %u\n", relsec,
printk("Applying relocate section %u to %u\n", relsec, sechdrs[relsec].sh_info);
sechdrs[relsec].sh_info);
#endif
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) {
location = (char *)sechdrs[sechdrs[relsec].sh_info].sh_addr location = (char *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rela[i].r_offset; + rela[i].r_offset;
...@@ -87,7 +84,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, ...@@ -87,7 +84,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
value -= ((unsigned long)location & -4) + 4; value -= ((unsigned long)location & -4) + 4;
if ((value & 3) != 0 || if ((value & 3) != 0 ||
((value + (1 << 19)) >> 20) != 0) { ((value + (1 << 19)) >> 20) != 0) {
printk("%s: relocation out of range, " pr_err("%s: relocation out of range, "
"section %d reloc %d " "section %d reloc %d "
"sym '%s'\n", "sym '%s'\n",
mod->name, relsec, i, mod->name, relsec, i,
...@@ -111,7 +108,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, ...@@ -111,7 +108,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
value -= (((unsigned long)location + 3) & -4); value -= (((unsigned long)location + 3) & -4);
if ((value & 3) != 0 || if ((value & 3) != 0 ||
(signed int)value >> 18 != -1) { (signed int)value >> 18 != -1) {
printk("%s: relocation out of range, " pr_err("%s: relocation out of range, "
"section %d reloc %d " "section %d reloc %d "
"sym '%s'\n", "sym '%s'\n",
mod->name, relsec, i, mod->name, relsec, i,
...@@ -156,7 +153,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, ...@@ -156,7 +153,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
case R_XTENSA_SLOT12_OP: case R_XTENSA_SLOT12_OP:
case R_XTENSA_SLOT13_OP: case R_XTENSA_SLOT13_OP:
case R_XTENSA_SLOT14_OP: case R_XTENSA_SLOT14_OP:
printk("%s: unexpected FLIX relocation: %u\n", pr_err("%s: unexpected FLIX relocation: %u\n",
mod->name, mod->name,
ELF32_R_TYPE(rela[i].r_info)); ELF32_R_TYPE(rela[i].r_info));
return -ENOEXEC; return -ENOEXEC;
...@@ -176,13 +173,13 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, ...@@ -176,13 +173,13 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
case R_XTENSA_SLOT12_ALT: case R_XTENSA_SLOT12_ALT:
case R_XTENSA_SLOT13_ALT: case R_XTENSA_SLOT13_ALT:
case R_XTENSA_SLOT14_ALT: case R_XTENSA_SLOT14_ALT:
printk("%s: unexpected ALT relocation: %u\n", pr_err("%s: unexpected ALT relocation: %u\n",
mod->name, mod->name,
ELF32_R_TYPE(rela[i].r_info)); ELF32_R_TYPE(rela[i].r_info));
return -ENOEXEC; return -ENOEXEC;
default: default:
printk("%s: unexpected relocation: %u\n", pr_err("%s: unexpected relocation: %u\n",
mod->name, mod->name,
ELF32_R_TYPE(rela[i].r_info)); ELF32_R_TYPE(rela[i].r_info));
return -ENOEXEC; return -ENOEXEC;
......
...@@ -29,14 +29,6 @@ ...@@ -29,14 +29,6 @@
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include <asm/platform.h> #include <asm/platform.h>
#undef DEBUG
#ifdef DEBUG
#define DBG(x...) printk(x)
#else
#define DBG(x...)
#endif
/* PCI Controller */ /* PCI Controller */
...@@ -101,8 +93,8 @@ pcibios_enable_resources(struct pci_dev *dev, int mask) ...@@ -101,8 +93,8 @@ pcibios_enable_resources(struct pci_dev *dev, int mask)
for(idx=0; idx<6; idx++) { for(idx=0; idx<6; idx++) {
r = &dev->resource[idx]; r = &dev->resource[idx];
if (!r->start && r->end) { if (!r->start && r->end) {
printk (KERN_ERR "PCI: Device %s not available because " pr_err("PCI: Device %s not available because "
"of resource collisions\n", pci_name(dev)); "of resource collisions\n", pci_name(dev));
return -EINVAL; return -EINVAL;
} }
if (r->flags & IORESOURCE_IO) if (r->flags & IORESOURCE_IO)
...@@ -113,7 +105,7 @@ pcibios_enable_resources(struct pci_dev *dev, int mask) ...@@ -113,7 +105,7 @@ pcibios_enable_resources(struct pci_dev *dev, int mask)
if (dev->resource[PCI_ROM_RESOURCE].start) if (dev->resource[PCI_ROM_RESOURCE].start)
cmd |= PCI_COMMAND_MEMORY; cmd |= PCI_COMMAND_MEMORY;
if (cmd != old_cmd) { if (cmd != old_cmd) {
printk("PCI: Enabling device %s (%04x -> %04x)\n", pr_info("PCI: Enabling device %s (%04x -> %04x)\n",
pci_name(dev), old_cmd, cmd); pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd); pci_write_config_word(dev, PCI_COMMAND, cmd);
} }
...@@ -144,8 +136,8 @@ static void __init pci_controller_apertures(struct pci_controller *pci_ctrl, ...@@ -144,8 +136,8 @@ static void __init pci_controller_apertures(struct pci_controller *pci_ctrl,
res = &pci_ctrl->io_resource; res = &pci_ctrl->io_resource;
if (!res->flags) { if (!res->flags) {
if (io_offset) if (io_offset)
printk (KERN_ERR "I/O resource not set for host" pr_err("I/O resource not set for host bridge %d\n",
" bridge %d\n", pci_ctrl->index); pci_ctrl->index);
res->start = 0; res->start = 0;
res->end = IO_SPACE_LIMIT; res->end = IO_SPACE_LIMIT;
res->flags = IORESOURCE_IO; res->flags = IORESOURCE_IO;
...@@ -159,8 +151,8 @@ static void __init pci_controller_apertures(struct pci_controller *pci_ctrl, ...@@ -159,8 +151,8 @@ static void __init pci_controller_apertures(struct pci_controller *pci_ctrl,
if (!res->flags) { if (!res->flags) {
if (i > 0) if (i > 0)
continue; continue;
printk(KERN_ERR "Memory resource not set for " pr_err("Memory resource not set for host bridge %d\n",
"host bridge %d\n", pci_ctrl->index); pci_ctrl->index);
res->start = 0; res->start = 0;
res->end = ~0U; res->end = ~0U;
res->flags = IORESOURCE_MEM; res->flags = IORESOURCE_MEM;
...@@ -176,7 +168,7 @@ static int __init pcibios_init(void) ...@@ -176,7 +168,7 @@ static int __init pcibios_init(void)
struct pci_bus *bus; struct pci_bus *bus;
int next_busno = 0, ret; int next_busno = 0, ret;
printk("PCI: Probing PCI hardware\n"); pr_info("PCI: Probing PCI hardware\n");
/* Scan all of the recorded PCI controllers. */ /* Scan all of the recorded PCI controllers. */
for (pci_ctrl = pci_ctrl_head; pci_ctrl; pci_ctrl = pci_ctrl->next) { for (pci_ctrl = pci_ctrl_head; pci_ctrl; pci_ctrl = pci_ctrl->next) {
...@@ -232,7 +224,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) ...@@ -232,7 +224,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
for (idx=0; idx<6; idx++) { for (idx=0; idx<6; idx++) {
r = &dev->resource[idx]; r = &dev->resource[idx];
if (!r->start && r->end) { if (!r->start && r->end) {
printk(KERN_ERR "PCI: Device %s not available because " pr_err("PCI: Device %s not available because "
"of resource collisions\n", pci_name(dev)); "of resource collisions\n", pci_name(dev));
return -EINVAL; return -EINVAL;
} }
...@@ -242,8 +234,8 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) ...@@ -242,8 +234,8 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
cmd |= PCI_COMMAND_MEMORY; cmd |= PCI_COMMAND_MEMORY;
} }
if (cmd != old_cmd) { if (cmd != old_cmd) {
printk("PCI: Enabling device %s (%04x -> %04x)\n", pr_info("PCI: Enabling device %s (%04x -> %04x)\n",
pci_name(dev), old_cmd, cmd); pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd); pci_write_config_word(dev, PCI_COMMAND, cmd);
} }
......
...@@ -156,7 +156,7 @@ static int __init parse_bootparam(const bp_tag_t* tag) ...@@ -156,7 +156,7 @@ static int __init parse_bootparam(const bp_tag_t* tag)
/* Boot parameters must start with a BP_TAG_FIRST tag. */ /* Boot parameters must start with a BP_TAG_FIRST tag. */
if (tag->id != BP_TAG_FIRST) { if (tag->id != BP_TAG_FIRST) {
printk(KERN_WARNING "Invalid boot parameters!\n"); pr_warn("Invalid boot parameters!\n");
return 0; return 0;
} }
...@@ -165,15 +165,14 @@ static int __init parse_bootparam(const bp_tag_t* tag) ...@@ -165,15 +165,14 @@ static int __init parse_bootparam(const bp_tag_t* tag)
/* Parse all tags. */ /* Parse all tags. */
while (tag != NULL && tag->id != BP_TAG_LAST) { while (tag != NULL && tag->id != BP_TAG_LAST) {
for (t = &__tagtable_begin; t < &__tagtable_end; t++) { for (t = &__tagtable_begin; t < &__tagtable_end; t++) {
if (tag->id == t->tag) { if (tag->id == t->tag) {
t->parse(tag); t->parse(tag);
break; break;
} }
} }
if (t == &__tagtable_end) if (t == &__tagtable_end)
printk(KERN_WARNING "Ignoring tag " pr_warn("Ignoring tag 0x%08x\n", tag->id);
"0x%08x\n", tag->id);
tag = (bp_tag_t*)((unsigned long)(tag + 1) + tag->size); tag = (bp_tag_t*)((unsigned long)(tag + 1) + tag->size);
} }
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include <asm/coprocessor.h> #include <asm/coprocessor.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#define DEBUG_SIG 0
extern struct task_struct *coproc_owners[]; extern struct task_struct *coproc_owners[];
struct rt_sigframe struct rt_sigframe
...@@ -399,10 +397,8 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set, ...@@ -399,10 +397,8 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
regs->areg[8] = (unsigned long) &frame->uc; regs->areg[8] = (unsigned long) &frame->uc;
regs->threadptr = tp; regs->threadptr = tp;
#if DEBUG_SIG pr_debug("SIG rt deliver (%s:%d): signal=%d sp=%p pc=%08lx\n",
printk("SIG rt deliver (%s:%d): signal=%d sp=%p pc=%08x\n", current->comm, current->pid, sig, frame, regs->pc);
current->comm, current->pid, sig, frame, regs->pc);
#endif
return 0; return 0;
} }
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/hardirq.h> #include <linux/hardirq.h>
#include <linux/ratelimit.h>
#include <asm/stacktrace.h> #include <asm/stacktrace.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
...@@ -178,13 +179,14 @@ __die_if_kernel(const char *str, struct pt_regs *regs, long err) ...@@ -178,13 +179,14 @@ __die_if_kernel(const char *str, struct pt_regs *regs, long err)
void do_unhandled(struct pt_regs *regs, unsigned long exccause) void do_unhandled(struct pt_regs *regs, unsigned long exccause)
{ {
__die_if_kernel("Caught unhandled exception - should not happen", __die_if_kernel("Caught unhandled exception - should not happen",
regs, SIGKILL); regs, SIGKILL);
/* If in user mode, send SIGILL signal to current process */ /* If in user mode, send SIGILL signal to current process */
printk("Caught unhandled exception in '%s' " pr_info_ratelimited("Caught unhandled exception in '%s' "
"(pid = %d, pc = %#010lx) - should not happen\n" "(pid = %d, pc = %#010lx) - should not happen\n"
"\tEXCCAUSE is %ld\n", "\tEXCCAUSE is %ld\n",
current->comm, task_pid_nr(current), regs->pc, exccause); current->comm, task_pid_nr(current), regs->pc,
exccause);
force_sig(SIGILL, current); force_sig(SIGILL, current);
} }
...@@ -305,8 +307,8 @@ do_illegal_instruction(struct pt_regs *regs) ...@@ -305,8 +307,8 @@ do_illegal_instruction(struct pt_regs *regs)
/* If in user mode, send SIGILL signal to current process. */ /* If in user mode, send SIGILL signal to current process. */
printk("Illegal Instruction in '%s' (pid = %d, pc = %#010lx)\n", pr_info_ratelimited("Illegal Instruction in '%s' (pid = %d, pc = %#010lx)\n",
current->comm, task_pid_nr(current), regs->pc); current->comm, task_pid_nr(current), regs->pc);
force_sig(SIGILL, current); force_sig(SIGILL, current);
} }
...@@ -325,13 +327,14 @@ do_unaligned_user (struct pt_regs *regs) ...@@ -325,13 +327,14 @@ do_unaligned_user (struct pt_regs *regs)
siginfo_t info; siginfo_t info;
__die_if_kernel("Unhandled unaligned exception in kernel", __die_if_kernel("Unhandled unaligned exception in kernel",
regs, SIGKILL); regs, SIGKILL);
current->thread.bad_vaddr = regs->excvaddr; current->thread.bad_vaddr = regs->excvaddr;
current->thread.error_code = -3; current->thread.error_code = -3;
printk("Unaligned memory access to %08lx in '%s' " pr_info_ratelimited("Unaligned memory access to %08lx in '%s' "
"(pid = %d, pc = %#010lx)\n", "(pid = %d, pc = %#010lx)\n",
regs->excvaddr, current->comm, task_pid_nr(current), regs->pc); regs->excvaddr, current->comm,
task_pid_nr(current), regs->pc);
info.si_signo = SIGBUS; info.si_signo = SIGBUS;
info.si_errno = 0; info.si_errno = 0;
info.si_code = BUS_ADRALN; info.si_code = BUS_ADRALN;
......
...@@ -49,17 +49,6 @@ ...@@ -49,17 +49,6 @@
* *
*/ */
/* define DEBUG to print some debugging messages. */
#undef DEBUG
#ifdef DEBUG
# define DBG(x...) printk(x)
#else
# define DBG(x...)
#endif
static int pciauto_upper_iospc; static int pciauto_upper_iospc;
static int pciauto_upper_memspc; static int pciauto_upper_memspc;
...@@ -97,7 +86,7 @@ pciauto_setup_bars(struct pci_dev *dev, int bar_limit) ...@@ -97,7 +86,7 @@ pciauto_setup_bars(struct pci_dev *dev, int bar_limit)
{ {
bar_size &= PCI_BASE_ADDRESS_IO_MASK; bar_size &= PCI_BASE_ADDRESS_IO_MASK;
upper_limit = &pciauto_upper_iospc; upper_limit = &pciauto_upper_iospc;
DBG("PCI Autoconfig: BAR %d, I/O, ", bar_nr); pr_debug("PCI Autoconfig: BAR %d, I/O, ", bar_nr);
} }
else else
{ {
...@@ -107,7 +96,7 @@ pciauto_setup_bars(struct pci_dev *dev, int bar_limit) ...@@ -107,7 +96,7 @@ pciauto_setup_bars(struct pci_dev *dev, int bar_limit)
bar_size &= PCI_BASE_ADDRESS_MEM_MASK; bar_size &= PCI_BASE_ADDRESS_MEM_MASK;
upper_limit = &pciauto_upper_memspc; upper_limit = &pciauto_upper_memspc;
DBG("PCI Autoconfig: BAR %d, Mem, ", bar_nr); pr_debug("PCI Autoconfig: BAR %d, Mem, ", bar_nr);
} }
/* Allocate a base address (bar_size is negative!) */ /* Allocate a base address (bar_size is negative!) */
...@@ -125,7 +114,8 @@ pciauto_setup_bars(struct pci_dev *dev, int bar_limit) ...@@ -125,7 +114,8 @@ pciauto_setup_bars(struct pci_dev *dev, int bar_limit)
if (found_mem64) if (found_mem64)
pci_write_config_dword(dev, (bar+=4), 0x00000000); pci_write_config_dword(dev, (bar+=4), 0x00000000);
DBG("size=0x%x, address=0x%x\n", ~bar_size + 1, *upper_limit); pr_debug("size=0x%x, address=0x%x\n",
~bar_size + 1, *upper_limit);
} }
} }
...@@ -150,7 +140,7 @@ pciauto_setup_irq(struct pci_controller* pci_ctrl,struct pci_dev *dev,int devfn) ...@@ -150,7 +140,7 @@ pciauto_setup_irq(struct pci_controller* pci_ctrl,struct pci_dev *dev,int devfn)
if (irq == -1) if (irq == -1)
irq = 0; irq = 0;
DBG("PCI Autoconfig: Interrupt %d, pin %d\n", irq, pin); pr_debug("PCI Autoconfig: Interrupt %d, pin %d\n", irq, pin);
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
} }
...@@ -289,8 +279,8 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) ...@@ -289,8 +279,8 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
int iosave, memsave; int iosave, memsave;
DBG("PCI Autoconfig: Found P2P bridge, device %d\n", pr_debug("PCI Autoconfig: Found P2P bridge, device %d\n",
PCI_SLOT(pci_devfn)); PCI_SLOT(pci_devfn));
/* Allocate PCI I/O and/or memory space */ /* Allocate PCI I/O and/or memory space */
pciauto_setup_bars(dev, PCI_BASE_ADDRESS_1); pciauto_setup_bars(dev, PCI_BASE_ADDRESS_1);
...@@ -306,23 +296,6 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) ...@@ -306,23 +296,6 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
} }
#if 0
/* Skip legacy mode IDE controller */
if ((pci_class >> 16) == PCI_CLASS_STORAGE_IDE) {
unsigned char prg_iface;
pci_read_config_byte(dev, PCI_CLASS_PROG, &prg_iface);
if (!(prg_iface & PCIAUTO_IDE_MODE_MASK)) {
DBG("PCI Autoconfig: Skipping legacy mode "
"IDE controller\n");
continue;
}
}
#endif
/* /*
* Found a peripheral, enable some standard * Found a peripheral, enable some standard
* settings * settings
...@@ -337,8 +310,8 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) ...@@ -337,8 +310,8 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x80); pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x80);
/* Allocate PCI I/O and/or memory space */ /* Allocate PCI I/O and/or memory space */
DBG("PCI Autoconfig: Found Bus %d, Device %d, Function %d\n", pr_debug("PCI Autoconfig: Found Bus %d, Device %d, Function %d\n",
current_bus, PCI_SLOT(pci_devfn), PCI_FUNC(pci_devfn) ); current_bus, PCI_SLOT(pci_devfn), PCI_FUNC(pci_devfn));
pciauto_setup_bars(dev, PCI_BASE_ADDRESS_5); pciauto_setup_bars(dev, PCI_BASE_ADDRESS_5);
pciauto_setup_irq(pci_ctrl, dev, pci_devfn); pciauto_setup_irq(pci_ctrl, dev, pci_devfn);
......
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
//#define printd(x...) printk(x)
#define printd(x...) do { } while(0)
/* /*
* Note: * Note:
* The kernel provides one architecture bit PG_arch_1 in the page flags that * The kernel provides one architecture bit PG_arch_1 in the page flags that
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
DEFINE_PER_CPU(unsigned long, asid_cache) = ASID_USER_FIRST; DEFINE_PER_CPU(unsigned long, asid_cache) = ASID_USER_FIRST;
void bad_page_fault(struct pt_regs*, unsigned long, int); void bad_page_fault(struct pt_regs*, unsigned long, int);
#undef DEBUG_PAGE_FAULT
/* /*
* This routine handles page faults. It determines the address, * This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate * and the problem, and then passes it off to one of the appropriate
...@@ -68,10 +66,10 @@ void do_page_fault(struct pt_regs *regs) ...@@ -68,10 +66,10 @@ void do_page_fault(struct pt_regs *regs)
exccause == EXCCAUSE_ITLB_MISS || exccause == EXCCAUSE_ITLB_MISS ||
exccause == EXCCAUSE_FETCH_CACHE_ATTRIBUTE) ? 1 : 0; exccause == EXCCAUSE_FETCH_CACHE_ATTRIBUTE) ? 1 : 0;
#ifdef DEBUG_PAGE_FAULT pr_debug("[%s:%d:%08x:%d:%08lx:%s%s]\n",
printk("[%s:%d:%08x:%d:%08x:%s%s]\n", current->comm, current->pid, current->comm, current->pid,
address, exccause, regs->pc, is_write? "w":"", is_exec? "x":""); address, exccause, regs->pc,
#endif is_write ? "w" : "", is_exec ? "x" : "");
if (user_mode(regs)) if (user_mode(regs))
flags |= FAULT_FLAG_USER; flags |= FAULT_FLAG_USER;
...@@ -247,10 +245,8 @@ bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) ...@@ -247,10 +245,8 @@ bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
/* Are we prepared to handle this kernel fault? */ /* Are we prepared to handle this kernel fault? */
if ((entry = search_exception_tables(regs->pc)) != NULL) { if ((entry = search_exception_tables(regs->pc)) != NULL) {
#ifdef DEBUG_PAGE_FAULT pr_debug("%s: Exception at pc=%#010lx (%lx)\n",
printk(KERN_DEBUG "%s: Exception at pc=%#010lx (%lx)\n", current->comm, regs->pc, entry->fixup);
current->comm, regs->pc, entry->fixup);
#endif
current->thread.bad_uaddr = address; current->thread.bad_uaddr = address;
regs->pc = entry->fixup; regs->pc = entry->fixup;
return; return;
...@@ -259,9 +255,9 @@ bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) ...@@ -259,9 +255,9 @@ bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
/* Oops. The kernel tried to access some bad page. We'll have to /* Oops. The kernel tried to access some bad page. We'll have to
* terminate things with extreme prejudice. * terminate things with extreme prejudice.
*/ */
printk(KERN_ALERT "Unable to handle kernel paging request at virtual " pr_alert("Unable to handle kernel paging request at virtual "
"address %08lx\n pc = %08lx, ra = %08lx\n", "address %08lx\n pc = %08lx, ra = %08lx\n",
address, regs->pc, regs->areg[0]); address, regs->pc, regs->areg[0]);
die("Oops", regs, sig); die("Oops", regs, sig);
do_exit(sig); do_exit(sig);
} }
...@@ -95,10 +95,8 @@ void local_flush_tlb_range(struct vm_area_struct *vma, ...@@ -95,10 +95,8 @@ void local_flush_tlb_range(struct vm_area_struct *vma,
if (mm->context.asid[cpu] == NO_CONTEXT) if (mm->context.asid[cpu] == NO_CONTEXT)
return; return;
#if 0 pr_debug("[tlbrange<%02lx,%08lx,%08lx>]\n",
printk("[tlbrange<%02lx,%08lx,%08lx>]\n", (unsigned long)mm->context.asid[cpu], start, end);
(unsigned long)mm->context.asid[cpu], start, end);
#endif
local_irq_save(flags); local_irq_save(flags);
if (end-start + (PAGE_SIZE-1) <= _TLB_ENTRIES << PAGE_SHIFT) { if (end-start + (PAGE_SIZE-1) <= _TLB_ENTRIES << PAGE_SHIFT) {
......
...@@ -186,7 +186,7 @@ int __init rs_init(void) ...@@ -186,7 +186,7 @@ int __init rs_init(void)
serial_driver = alloc_tty_driver(SERIAL_MAX_NUM_LINES); serial_driver = alloc_tty_driver(SERIAL_MAX_NUM_LINES);
printk ("%s %s\n", serial_name, serial_version); pr_info("%s %s\n", serial_name, serial_version);
/* Initialize the tty_driver structure */ /* Initialize the tty_driver structure */
...@@ -215,7 +215,7 @@ static __exit void rs_exit(void) ...@@ -215,7 +215,7 @@ static __exit void rs_exit(void)
int error; int error;
if ((error = tty_unregister_driver(serial_driver))) if ((error = tty_unregister_driver(serial_driver)))
printk("ISS_SERIAL: failed to unregister serial driver (%d)\n", pr_err("ISS_SERIAL: failed to unregister serial driver (%d)\n",
error); error);
put_tty_driver(serial_driver); put_tty_driver(serial_driver);
tty_port_destroy(&serial_port); tty_port_destroy(&serial_port);
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* *
*/ */
#define pr_fmt(fmt) "%s: " fmt, __func__
#include <linux/list.h> #include <linux/list.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
...@@ -609,8 +611,6 @@ struct iss_net_init { ...@@ -609,8 +611,6 @@ struct iss_net_init {
* those fields. They will be later initialized in iss_net_init. * those fields. They will be later initialized in iss_net_init.
*/ */
#define ERR KERN_ERR "iss_net_setup: "
static int __init iss_net_setup(char *str) static int __init iss_net_setup(char *str)
{ {
struct iss_net_private *device = NULL; struct iss_net_private *device = NULL;
...@@ -622,14 +622,14 @@ static int __init iss_net_setup(char *str) ...@@ -622,14 +622,14 @@ static int __init iss_net_setup(char *str)
end = strchr(str, '='); end = strchr(str, '=');
if (!end) { if (!end) {
printk(ERR "Expected '=' after device number\n"); pr_err("Expected '=' after device number\n");
return 1; return 1;
} }
*end = 0; *end = 0;
rc = kstrtouint(str, 0, &n); rc = kstrtouint(str, 0, &n);
*end = '='; *end = '=';
if (rc < 0) { if (rc < 0) {
printk(ERR "Failed to parse '%s'\n", str); pr_err("Failed to parse '%s'\n", str);
return 1; return 1;
} }
str = end; str = end;
...@@ -645,13 +645,13 @@ static int __init iss_net_setup(char *str) ...@@ -645,13 +645,13 @@ static int __init iss_net_setup(char *str)
spin_unlock(&devices_lock); spin_unlock(&devices_lock);
if (device && device->index == n) { if (device && device->index == n) {
printk(ERR "Device %u already configured\n", n); pr_err("Device %u already configured\n", n);
return 1; return 1;
} }
new = alloc_bootmem(sizeof(*new)); new = alloc_bootmem(sizeof(*new));
if (new == NULL) { if (new == NULL) {
printk(ERR "Alloc_bootmem failed\n"); pr_err("Alloc_bootmem failed\n");
return 1; return 1;
} }
...@@ -663,8 +663,6 @@ static int __init iss_net_setup(char *str) ...@@ -663,8 +663,6 @@ static int __init iss_net_setup(char *str)
return 1; return 1;
} }
#undef ERR
__setup("eth", iss_net_setup); __setup("eth", iss_net_setup);
/* /*
......
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