diff options
Diffstat (limited to 'arch/x86/kernel/irq.c')
-rw-r--r-- | arch/x86/kernel/irq.c | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 3973e2df7f87..f13ca1650aaf 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 | ||
@@ -36,11 +38,7 @@ void ack_bad_irq(unsigned int irq) | |||
36 | #endif | 38 | #endif |
37 | } | 39 | } |
38 | 40 | ||
39 | #ifdef CONFIG_X86_32 | 41 | #define irq_stats(x) (&per_cpu(irq_stat, x)) |
40 | # define irq_stats(x) (&per_cpu(irq_stat, x)) | ||
41 | #else | ||
42 | # define irq_stats(x) cpu_pda(x) | ||
43 | #endif | ||
44 | /* | 42 | /* |
45 | * /proc/interrupts printing: | 43 | * /proc/interrupts printing: |
46 | */ | 44 | */ |
@@ -192,4 +190,40 @@ u64 arch_irq_stat(void) | |||
192 | return sum; | 190 | return sum; |
193 | } | 191 | } |
194 | 192 | ||
193 | |||
194 | /* | ||
195 | * do_IRQ handles all normal device IRQ's (the special | ||
196 | * SMP cross-CPU interrupts have their own specific | ||
197 | * handlers). | ||
198 | */ | ||
199 | unsigned int __irq_entry do_IRQ(struct pt_regs *regs) | ||
200 | { | ||
201 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
202 | |||
203 | /* high bit used in ret_from_ code */ | ||
204 | unsigned vector = ~regs->orig_ax; | ||
205 | unsigned irq; | ||
206 | |||
207 | exit_idle(); | ||
208 | irq_enter(); | ||
209 | |||
210 | irq = __get_cpu_var(vector_irq)[vector]; | ||
211 | |||
212 | if (!handle_irq(irq, regs)) { | ||
213 | #ifdef CONFIG_X86_64 | ||
214 | if (!disable_apic) | ||
215 | ack_APIC_irq(); | ||
216 | #endif | ||
217 | |||
218 | if (printk_ratelimit()) | ||
219 | printk(KERN_EMERG "%s: %d.%d No irq handler for vector (irq %d)\n", | ||
220 | __func__, smp_processor_id(), vector, irq); | ||
221 | } | ||
222 | |||
223 | irq_exit(); | ||
224 | |||
225 | set_irq_regs(old_regs); | ||
226 | return 1; | ||
227 | } | ||
228 | |||
195 | EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); | 229 | EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); |