#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/uaccess.h>
-#include <asm/pgalloc.h>
#include <asm/delay.h>
#include <asm/desc.h>
#include <asm/irq.h>
/*
* per-CPU IRQ handling stacks
*/
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
union irq_ctx *hardirq_ctx[NR_CPUS];
union irq_ctx *softirq_ctx[NR_CPUS];
#endif
printk(KERN_ERR "irq event %d: bogus return value %x\n",
irq, action_ret);
} else {
- printk(KERN_ERR "irq %d: nobody cared!\n", irq);
+ printk(KERN_ERR "irq %d: nobody cared! (screaming interrupt?)\n", irq);
+ printk(KERN_ERR "irq %d: Please try booting with acpi=off and report a bug\n", irq);
}
dump_stack();
printk(KERN_ERR "handlers:\n");
* useful for irq hardware that does not mask cleanly in an
* SMP environment.
*/
-#ifdef CONFIG_4KSTACKS
for (;;) {
irqreturn_t action_ret;
u32 *isp;
union irq_ctx * curctx;
union irq_ctx * irqctx;
-
+#ifdef CONFIG_IRQSTACKS
curctx = (union irq_ctx *) current_thread_info();
irqctx = hardirq_ctx[smp_processor_id()];
-
+#else
+ curctx = irqctx = (union irq_ctx *)0;
+#endif
spin_unlock(&desc->lock);
/*
/* build the stack frame on the IRQ stack */
isp = (u32*) ((char*)irqctx + sizeof(*irqctx));
irqctx->tinfo.task = curctx->tinfo.task;
+ irqctx->tinfo.real_stack = curctx->tinfo.real_stack;
+ irqctx->tinfo.virtual_stack = curctx->tinfo.virtual_stack;
irqctx->tinfo.previous_esp = current_stack_pointer();
*--isp = (u32) action;
break;
desc->status &= ~IRQ_PENDING;
}
-
-#else
-
- for (;;) {
- irqreturn_t action_ret;
-
- spin_unlock(&desc->lock);
-
- action_ret = handle_IRQ_event(irq, ®s, action);
-
- spin_lock(&desc->lock);
- if (!noirqdebug)
- note_interrupt(irq, desc, action_ret);
- if (likely(!(desc->status & IRQ_PENDING)))
- break;
- desc->status &= ~IRQ_PENDING;
- }
-#endif
desc->status &= ~IRQ_INPROGRESS;
out:
action->handler = handler;
action->flags = irqflags;
- action->mask = 0;
+ cpus_clear(action->mask);
action->name = devname;
action->next = NULL;
action->dev_id = dev_id;
int i;
/* create /proc/irq */
- root_irq_dir = proc_mkdir("irq", 0);
+ root_irq_dir = proc_mkdir("irq", NULL);
/* create /proc/irq/prof_cpu_mask */
entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
}
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
+/*
+ * These should really be __section__(".bss.page_aligned") as well, but
+ * gcc's 3.0 and earlier don't handle that correctly.
+ */
static char softirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE)));
static char hardirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE)));
curctx = current_thread_info();
irqctx = softirq_ctx[smp_processor_id()];
irqctx->tinfo.task = curctx->task;
+ irqctx->tinfo.real_stack = curctx->real_stack;
+ irqctx->tinfo.virtual_stack = curctx->virtual_stack;
irqctx->tinfo.previous_esp = current_stack_pointer();
/* build the stack frame on the softirq stack */