Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 2 | #ifndef _ASM_X86_IRQ_H |
| 3 | #define _ASM_X86_IRQ_H |
Thomas Gleixner | 22067d4 | 2008-05-02 22:14:44 +0200 | [diff] [blame] | 4 | /* |
| 5 | * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar |
| 6 | * |
| 7 | * IRQ/IPI changes taken from work by Thomas Radke |
| 8 | * <tomsoft@informatik.tu-chemnitz.de> |
| 9 | */ |
| 10 | |
| 11 | #include <asm/apicdef.h> |
| 12 | #include <asm/irq_vectors.h> |
| 13 | |
| 14 | static inline int irq_canonicalize(int irq) |
| 15 | { |
| 16 | return ((irq == 2) ? 9 : irq); |
| 17 | } |
| 18 | |
Thomas Gleixner | 66c7ceb | 2019-04-14 18:00:04 +0200 | [diff] [blame] | 19 | extern int irq_init_percpu_irqstack(unsigned int cpu); |
Thomas Gleixner | 22067d4 | 2008-05-02 22:14:44 +0200 | [diff] [blame] | 20 | |
Christoph Hellwig | 7974891 | 2010-06-28 14:15:54 +0200 | [diff] [blame] | 21 | #define __ARCH_HAS_DO_SOFTIRQ |
| 22 | |
Thomas Gleixner | 90a2282 | 2015-12-31 16:30:53 +0000 | [diff] [blame] | 23 | struct irq_desc; |
| 24 | |
Mike Travis | d7b381b | 2008-12-16 17:33:58 -0800 | [diff] [blame] | 25 | extern void fixup_irqs(void); |
Thomas Gleixner | 22067d4 | 2008-05-02 22:14:44 +0200 | [diff] [blame] | 26 | |
Feng Wu | f6b3c72c | 2015-05-19 17:07:16 +0800 | [diff] [blame] | 27 | #ifdef CONFIG_HAVE_KVM |
| 28 | extern void kvm_set_posted_intr_wakeup_handler(void (*handler)(void)); |
Yi Wang | 89f579c | 2018-11-22 10:04:09 +0800 | [diff] [blame] | 29 | extern __visible void smp_kvm_posted_intr_ipi(struct pt_regs *regs); |
| 30 | extern __visible void smp_kvm_posted_intr_wakeup_ipi(struct pt_regs *regs); |
| 31 | extern __visible void smp_kvm_posted_intr_nested_ipi(struct pt_regs *regs); |
Feng Wu | f6b3c72c | 2015-05-19 17:07:16 +0800 | [diff] [blame] | 32 | #endif |
| 33 | |
Dimitri Sivanich | 4a4de9c | 2009-10-14 09:22:57 -0500 | [diff] [blame] | 34 | extern void (*x86_platform_ipi_callback)(void); |
Thomas Gleixner | 22067d4 | 2008-05-02 22:14:44 +0200 | [diff] [blame] | 35 | extern void native_init_IRQ(void); |
Thomas Gleixner | a782a7e | 2015-08-02 20:38:27 +0000 | [diff] [blame] | 36 | |
Heiner Kallweit | d6f8342 | 2019-08-19 21:36:09 +0200 | [diff] [blame] | 37 | extern void handle_irq(struct irq_desc *desc, struct pt_regs *regs); |
Thomas Gleixner | 22067d4 | 2008-05-02 22:14:44 +0200 | [diff] [blame] | 38 | |
Andi Kleen | 1d9090e | 2013-08-05 15:02:37 -0700 | [diff] [blame] | 39 | extern __visible unsigned int do_IRQ(struct pt_regs *regs); |
Jeremy Fitzhardinge | 7c1d7cd | 2009-02-06 14:09:41 -0800 | [diff] [blame] | 40 | |
Thomas Gleixner | d9112f4 | 2009-08-20 09:41:38 +0200 | [diff] [blame] | 41 | extern void init_ISA_irqs(void); |
| 42 | |
Yi Wang | 89f579c | 2018-11-22 10:04:09 +0800 | [diff] [blame] | 43 | extern void __init init_IRQ(void); |
| 44 | |
Michel Lespinasse | b52e0a7 | 2013-06-06 04:41:15 -0700 | [diff] [blame] | 45 | #ifdef CONFIG_X86_LOCAL_APIC |
Chris Metcalf | 9a01c3e | 2016-10-07 17:02:45 -0700 | [diff] [blame] | 46 | void arch_trigger_cpumask_backtrace(const struct cpumask *mask, |
| 47 | bool exclude_self); |
Yi Wang | 89f579c | 2018-11-22 10:04:09 +0800 | [diff] [blame] | 48 | |
| 49 | extern __visible void smp_x86_platform_ipi(struct pt_regs *regs); |
Chris Metcalf | 9a01c3e | 2016-10-07 17:02:45 -0700 | [diff] [blame] | 50 | #define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace |
Michel Lespinasse | b52e0a7 | 2013-06-06 04:41:15 -0700 | [diff] [blame] | 51 | #endif |
| 52 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 53 | #endif /* _ASM_X86_IRQ_H */ |