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)
return 0;
}
static inline void
handle_irq_event(int irq, struct pt_regs *regs, struct irqaction *action)
extern char *ppc_find_proc_name(unsigned *p, char *buf, unsigned buflen);
static inline void handle_irq_event(int irq, struct pt_regs *regs,
struct irqaction *action)
{
int status = 0;
int retval = 0;
struct irqaction *first_action = action;
if (!(action->flags & SA_INTERRUPT))
local_irq_enable();
do {
status |= action->flags;
action->handler(irq, action->dev_id, regs);
retval |= action->handler(irq, action->dev_id, regs);
action = action->next;
} while (action);
if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
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,
}
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)
{
......@@ -426,7 +426,7 @@ void initialize_paca_hardware_interrupt_stack(void)
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 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