diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 14:09:40 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-09 12:15:57 +0100 |
commit | 9b2b76a3344146c4d8d300874e73af8161204f87 (patch) | |
tree | 13c22f62ac7610f07b93fe9f4a75e0f57ebb450d /arch/x86/kernel/irq_64.c | |
parent | cc6c50066ec1ac98bef97117e2f078bb89bbccc7 (diff) | |
download | kernel_samsung_tuna-9b2b76a3344146c4d8d300874e73af8161204f87.zip kernel_samsung_tuna-9b2b76a3344146c4d8d300874e73af8161204f87.tar.gz kernel_samsung_tuna-9b2b76a3344146c4d8d300874e73af8161204f87.tar.bz2 |
x86: add handle_irq() to allow interrupt injection
Xen uses a different interrupt path, so introduce handle_irq() to
allow interrupts to be inserted into the normal interrupt path. This
is handled slightly differently on 32 and 64-bit.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/irq_64.c')
-rw-r--r-- | arch/x86/kernel/irq_64.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c index 018963a..a93f3b0 100644 --- a/arch/x86/kernel/irq_64.c +++ b/arch/x86/kernel/irq_64.c @@ -48,6 +48,20 @@ static inline void stack_overflow_check(struct pt_regs *regs) #endif } +bool handle_irq(unsigned irq, struct pt_regs *regs) +{ + struct irq_desc *desc; + + stack_overflow_check(regs); + + desc = irq_to_desc(irq); + if (unlikely(!desc)) + return false; + + generic_handle_irq_desc(irq, desc); + return true; +} + /* * do_IRQ handles all normal device IRQ's (the special * SMP cross-CPU interrupts have their own specific @@ -56,7 +70,6 @@ static inline void stack_overflow_check(struct pt_regs *regs) asmlinkage unsigned int __irq_entry do_IRQ(struct pt_regs *regs) { struct pt_regs *old_regs = set_irq_regs(regs); - struct irq_desc *desc; /* high bit used in ret_from_ code */ unsigned vector = ~regs->orig_ax; @@ -64,14 +77,10 @@ asmlinkage unsigned int __irq_entry do_IRQ(struct pt_regs *regs) exit_idle(); irq_enter(); - irq = __get_cpu_var(vector_irq)[vector]; - stack_overflow_check(regs); + irq = __get_cpu_var(vector_irq)[vector]; - desc = irq_to_desc(irq); - if (likely(desc)) - generic_handle_irq_desc(irq, desc); - else { + if (!handle_irq(irq, regs)) { if (!disable_apic) ack_APIC_irq(); |