git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git]
/
arch
/
i386
/
kernel
/
irq.c
diff --git
a/arch/i386/kernel/irq.c
b/arch/i386/kernel/irq.c
index
2904a66
..
97a0591
100644
(file)
--- a/
arch/i386/kernel/irq.c
+++ b/
arch/i386/kernel/irq.c
@@
-18,6
+18,7
@@
#include <linux/notifier.h>
#include <linux/cpu.h>
#include <linux/delay.h>
#include <linux/notifier.h>
#include <linux/cpu.h>
#include <linux/delay.h>
+#include <linux/vs_context.h>
DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_internodealigned_in_smp;
EXPORT_PER_CPU_SYMBOL(irq_stat);
DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_internodealigned_in_smp;
EXPORT_PER_CPU_SYMBOL(irq_stat);
@@
-42,8
+43,8
@@
union irq_ctx {
u32 stack[THREAD_SIZE/sizeof(u32)];
};
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
/*
#endif
/*
@@
-55,11
+56,18
@@
fastcall unsigned int do_IRQ(struct pt_regs *regs)
{
/* high bit used in ret_from_ code */
int irq = ~regs->orig_eax;
{
/* high bit used in ret_from_ code */
int irq = ~regs->orig_eax;
+ struct vx_info_save vxis;
#ifdef CONFIG_4KSTACKS
union irq_ctx *curctx, *irqctx;
u32 *isp;
#endif
#ifdef CONFIG_4KSTACKS
union irq_ctx *curctx, *irqctx;
u32 *isp;
#endif
+ if (unlikely((unsigned)irq >= NR_IRQS)) {
+ printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
+ __FUNCTION__, irq);
+ BUG();
+ }
+
irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB free? */
irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB free? */
@@
-75,7
+83,7
@@
fastcall unsigned int do_IRQ(struct pt_regs *regs)
}
}
#endif
}
}
#endif
-
+ __enter_vx_admin(&vxis);
#ifdef CONFIG_4KSTACKS
curctx = (union irq_ctx *) current_thread_info();
#ifdef CONFIG_4KSTACKS
curctx = (union irq_ctx *) current_thread_info();
@@
-95,6
+103,14
@@
fastcall unsigned int do_IRQ(struct pt_regs *regs)
irqctx->tinfo.task = curctx->tinfo.task;
irqctx->tinfo.previous_esp = current_stack_pointer;
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"
asm volatile(
" xchgl %%ebx,%%esp \n"
" call __do_IRQ \n"
@@
-106,6
+122,7
@@
fastcall unsigned int do_IRQ(struct pt_regs *regs)
} else
#endif
__do_IRQ(irq, regs);
} else
#endif
__do_IRQ(irq, regs);
+ __leave_vx_admin(&vxis);
irq_exit();
irq_exit();
@@
-147,7
+164,7
@@
void irq_ctx_init(int cpu)
irqctx->tinfo.task = NULL;
irqctx->tinfo.exec_domain = NULL;
irqctx->tinfo.cpu = cpu;
irqctx->tinfo.task = NULL;
irqctx->tinfo.exec_domain = NULL;
irqctx->tinfo.cpu = cpu;
- irqctx->tinfo.preempt_count =
SOFTIRQ_OFFSET
;
+ irqctx->tinfo.preempt_count =
0
;
irqctx->tinfo.addr_limit = MAKE_MM_SEG(0);
softirq_ctx[cpu] = irqctx;
irqctx->tinfo.addr_limit = MAKE_MM_SEG(0);
softirq_ctx[cpu] = irqctx;
@@
-192,6
+209,10
@@
asmlinkage void do_softirq(void)
: "0"(isp)
: "memory", "cc", "edx", "ecx", "eax"
);
: "0"(isp)
: "memory", "cc", "edx", "ecx", "eax"
);
+ /*
+ * Shouldnt happen, we returned above if in_interrupt():
+ */
+ WARN_ON_ONCE(softirq_count());
}
local_irq_restore(flags);
}
local_irq_restore(flags);
@@
-219,7
+240,7
@@
int show_interrupts(struct seq_file *p, void *v)
if (i == 0) {
seq_printf(p, " ");
for_each_online_cpu(j)
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');
}
seq_putc(p, '\n');
}
@@
-235,7
+256,7
@@
int show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
#endif
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
#endif
- seq_printf(p, " %14s", irq_desc[i].
handler
->typename);
+ seq_printf(p, " %14s", irq_desc[i].
chip
->typename);
seq_printf(p, " %s", action->name);
for (action=action->next; action; action = action->next)
seq_printf(p, " %s", action->name);
for (action=action->next; action; action = action->next)
@@
-277,13
+298,13
@@
void fixup_irqs(cpumask_t map)
if (irq == 2)
continue;
if (irq == 2)
continue;
- cpus_and(mask, irq_
affinity[irq]
, map);
+ cpus_and(mask, irq_
desc[irq].affinity
, map);
if (any_online_cpu(mask) == NR_CPUS) {
printk("Breaking affinity for irq %i\n", irq);
mask = map;
}
if (any_online_cpu(mask) == NR_CPUS) {
printk("Breaking affinity for irq %i\n", irq);
mask = map;
}
- if (irq_desc[irq].
handler
->set_affinity)
- irq_desc[irq].
handler
->set_affinity(irq, mask);
+ if (irq_desc[irq].
chip
->set_affinity)
+ irq_desc[irq].
chip
->set_affinity(irq, mask);
else if (irq_desc[irq].action && !(warned++))
printk("Cannot set affinity for irq %i\n", irq);
}
else if (irq_desc[irq].action && !(warned++))
printk("Cannot set affinity for irq %i\n", irq);
}