diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-13 03:49:38 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-13 03:49:38 -0500 |
commit | b1864e9a1afef41709886072c6e6248def0386f4 (patch) | |
tree | 2fe749209cf860c1dd10efd1bd2ad8df572bd66e /arch/x86/kernel/irq.c | |
parent | e9c4ffb11f0b19005b5b9dc8481687a3637e5887 (diff) | |
parent | 7032e8696726354d6180d8a2d17191f958cd93ae (diff) |
Merge branch 'x86/core' into perfcounters/core
Conflicts:
arch/x86/Kconfig
arch/x86/kernel/apic.c
arch/x86/kernel/setup_percpu.c
Diffstat (limited to 'arch/x86/kernel/irq.c')
-rw-r--r-- | arch/x86/kernel/irq.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index a6bca1d33a8a..7c95c8918a8f 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -6,10 +6,12 @@ | |||
6 | #include <linux/kernel_stat.h> | 6 | #include <linux/kernel_stat.h> |
7 | #include <linux/seq_file.h> | 7 | #include <linux/seq_file.h> |
8 | #include <linux/smp.h> | 8 | #include <linux/smp.h> |
9 | #include <linux/ftrace.h> | ||
9 | 10 | ||
10 | #include <asm/apic.h> | 11 | #include <asm/apic.h> |
11 | #include <asm/io_apic.h> | 12 | #include <asm/io_apic.h> |
12 | #include <asm/irq.h> | 13 | #include <asm/irq.h> |
14 | #include <asm/idle.h> | ||
13 | 15 | ||
14 | atomic_t irq_err_count; | 16 | atomic_t irq_err_count; |
15 | 17 | ||
@@ -193,4 +195,40 @@ u64 arch_irq_stat(void) | |||
193 | return sum; | 195 | return sum; |
194 | } | 196 | } |
195 | 197 | ||
198 | |||
199 | /* | ||
200 | * do_IRQ handles all normal device IRQ's (the special | ||
201 | * SMP cross-CPU interrupts have their own specific | ||
202 | * handlers). | ||
203 | */ | ||
204 | unsigned int __irq_entry do_IRQ(struct pt_regs *regs) | ||
205 | { | ||
206 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
207 | |||
208 | /* high bit used in ret_from_ code */ | ||
209 | unsigned vector = ~regs->orig_ax; | ||
210 | unsigned irq; | ||
211 | |||
212 | exit_idle(); | ||
213 | irq_enter(); | ||
214 | |||
215 | irq = __get_cpu_var(vector_irq)[vector]; | ||
216 | |||
217 | if (!handle_irq(irq, regs)) { | ||
218 | #ifdef CONFIG_X86_64 | ||
219 | if (!disable_apic) | ||
220 | ack_APIC_irq(); | ||
221 | #endif | ||
222 | |||
223 | if (printk_ratelimit()) | ||
224 | printk(KERN_EMERG "%s: %d.%d No irq handler for vector (irq %d)\n", | ||
225 | __func__, smp_processor_id(), vector, irq); | ||
226 | } | ||
227 | |||
228 | irq_exit(); | ||
229 | |||
230 | set_irq_regs(old_regs); | ||
231 | return 1; | ||
232 | } | ||
233 | |||
196 | EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); | 234 | EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); |