This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / i386 / kernel / irq.c
index ea69f21..1c8beda 100644 (file)
@@ -41,7 +41,6 @@
 #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>
@@ -77,7 +76,7 @@ static void register_irq_proc (unsigned int irq);
 /*
  * 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
@@ -245,7 +244,8 @@ static void __report_bad_irq(int irq, irq_desc_t *desc, irqreturn_t action_ret)
                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");
@@ -488,17 +488,18 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs)
         * 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);
 
                /*
@@ -514,6 +515,8 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs)
                        /* 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;
@@ -540,24 +543,6 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs)
                        break;
                desc->status &= ~IRQ_PENDING;
        }
-
-#else
-
-       for (;;) {
-               irqreturn_t action_ret;
-
-               spin_unlock(&desc->lock);
-
-               action_ret = handle_IRQ_event(irq, &regs, 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:
@@ -653,7 +638,7 @@ int request_irq(unsigned int irq,
 
        action->handler = handler;
        action->flags = irqflags;
-       action->mask = 0;
+       cpus_clear(action->mask);
        action->name = devname;
        action->next = NULL;
        action->dev_id = dev_id;
@@ -1095,7 +1080,7 @@ void init_irq_proc (void)
        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);
@@ -1116,7 +1101,11 @@ void init_irq_proc (void)
 }
 
 
-#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)));
 
@@ -1170,6 +1159,8 @@ asmlinkage void do_softirq(void)
                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 */