Commit 637823d2 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: Add warning for unhandled irqs

parent 9a85fcd4
...@@ -381,22 +381,48 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -381,22 +381,48 @@ int show_interrupts(struct seq_file *p, void *v)
return 0; return 0;
} }
static inline void extern char *ppc_find_proc_name(unsigned *p, char *buf, unsigned buflen);
handle_irq_event(int irq, struct pt_regs *regs, struct irqaction *action)
static inline void handle_irq_event(int irq, struct pt_regs *regs,
struct irqaction *action)
{ {
int status = 0; int status = 0;
int retval = 0;
struct irqaction *first_action = action;
if (!(action->flags & SA_INTERRUPT)) if (!(action->flags & SA_INTERRUPT))
local_irq_enable(); local_irq_enable();
do { do {
status |= action->flags; status |= action->flags;
action->handler(irq, action->dev_id, regs); retval |= action->handler(irq, action->dev_id, regs);
action = action->next; action = action->next;
} while (action); } while (action);
if (status & SA_SAMPLE_RANDOM) if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq); add_interrupt_randomness(irq);
local_irq_disable(); local_irq_disable();
if (retval != 1) {
static int count = 100;
char name_buf[256];
if (count) {
count--;
if (retval) {
printk("irq event %d: bogus retval mask %x\n",
irq, retval);
} else {
printk("irq %d: nobody cared!\n", irq);
}
dump_stack();
printk("handlers:\n");
action = first_action;
do {
printk("[<%p>]", action->handler);
printk(" (%s)\n",
ppc_find_proc_name((unsigned *)action->handler, name_buf, 256));
action = action->next;
} while (action);
}
}
} }
/* /*
......
...@@ -129,7 +129,7 @@ struct task_struct *__switch_to(struct task_struct *prev, ...@@ -129,7 +129,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
} }
static void show_tsk_stack(struct task_struct *p, unsigned long sp); static void show_tsk_stack(struct task_struct *p, unsigned long sp);
static char *ppc_find_proc_name(unsigned *p, char *buf, unsigned buflen); char *ppc_find_proc_name(unsigned *p, char *buf, unsigned buflen);
void show_regs(struct pt_regs * regs) void show_regs(struct pt_regs * regs)
{ {
...@@ -426,7 +426,7 @@ void initialize_paca_hardware_interrupt_stack(void) ...@@ -426,7 +426,7 @@ void initialize_paca_hardware_interrupt_stack(void)
extern char _stext[], _etext[], __init_begin[], __init_end[]; extern char _stext[], _etext[], __init_begin[], __init_end[];
static char *ppc_find_proc_name(unsigned *p, char *buf, unsigned buflen) char *ppc_find_proc_name(unsigned *p, char *buf, unsigned buflen)
{ {
unsigned long tb_flags; unsigned long tb_flags;
unsigned short name_len; unsigned short name_len;
......
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