Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
[pandora-kernel.git] / arch / i386 / kernel / irq.c
index f3a9c78..061533e 100644 (file)
@@ -42,8 +42,8 @@ union irq_ctx {
        u32                     stack[THREAD_SIZE/sizeof(u32)];
 };
 
-static union irq_ctx *hardirq_ctx[NR_CPUS];
-static union irq_ctx *softirq_ctx[NR_CPUS];
+static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly;
+static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
 #endif
 
 /*
@@ -95,6 +95,14 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
                irqctx->tinfo.task = curctx->tinfo.task;
                irqctx->tinfo.previous_esp = current_stack_pointer;
 
+               /*
+                * Copy the softirq bits in preempt_count so that the
+                * softirq checks work in the hardirq context.
+                */
+               irqctx->tinfo.preempt_count =
+                       irqctx->tinfo.preempt_count & ~SOFTIRQ_MASK |
+                       curctx->tinfo.preempt_count & SOFTIRQ_MASK;
+
                asm volatile(
                        "       xchgl   %%ebx,%%esp      \n"
                        "       call    __do_IRQ         \n"
@@ -219,7 +227,7 @@ int show_interrupts(struct seq_file *p, void *v)
        if (i == 0) {
                seq_printf(p, "           ");
                for_each_online_cpu(j)
-                       seq_printf(p, "CPU%d       ",j);
+                       seq_printf(p, "CPU%-8d",j);
                seq_putc(p, '\n');
        }