blob: a176f6165d85b12e8d52e83eef6402c7148885b9 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
H. Peter Anvin1965aae2008-10-22 22:26:29 -07002#ifndef _ASM_X86_IRQ_H
3#define _ASM_X86_IRQ_H
Thomas Gleixner22067d42008-05-02 22:14:44 +02004/*
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
14static inline int irq_canonicalize(int irq)
15{
16 return ((irq == 2) ? 9 : irq);
17}
18
Thomas Gleixner66c7ceb2019-04-14 18:00:04 +020019extern int irq_init_percpu_irqstack(unsigned int cpu);
Thomas Gleixner22067d42008-05-02 22:14:44 +020020
Christoph Hellwig79748912010-06-28 14:15:54 +020021#define __ARCH_HAS_DO_SOFTIRQ
22
Thomas Gleixner90a22822015-12-31 16:30:53 +000023struct irq_desc;
24
Mike Travisd7b381b2008-12-16 17:33:58 -080025extern void fixup_irqs(void);
Thomas Gleixner22067d42008-05-02 22:14:44 +020026
Feng Wuf6b3c72c2015-05-19 17:07:16 +080027#ifdef CONFIG_HAVE_KVM
28extern void kvm_set_posted_intr_wakeup_handler(void (*handler)(void));
Yi Wang89f579c2018-11-22 10:04:09 +080029extern __visible void smp_kvm_posted_intr_ipi(struct pt_regs *regs);
30extern __visible void smp_kvm_posted_intr_wakeup_ipi(struct pt_regs *regs);
31extern __visible void smp_kvm_posted_intr_nested_ipi(struct pt_regs *regs);
Feng Wuf6b3c72c2015-05-19 17:07:16 +080032#endif
33
Dimitri Sivanich4a4de9c2009-10-14 09:22:57 -050034extern void (*x86_platform_ipi_callback)(void);
Thomas Gleixner22067d42008-05-02 22:14:44 +020035extern void native_init_IRQ(void);
Thomas Gleixnera782a7e2015-08-02 20:38:27 +000036
Heiner Kallweitd6f83422019-08-19 21:36:09 +020037extern void handle_irq(struct irq_desc *desc, struct pt_regs *regs);
Thomas Gleixner22067d42008-05-02 22:14:44 +020038
Andi Kleen1d9090e2013-08-05 15:02:37 -070039extern __visible unsigned int do_IRQ(struct pt_regs *regs);
Jeremy Fitzhardinge7c1d7cd2009-02-06 14:09:41 -080040
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020041extern void init_ISA_irqs(void);
42
Yi Wang89f579c2018-11-22 10:04:09 +080043extern void __init init_IRQ(void);
44
Michel Lespinasseb52e0a72013-06-06 04:41:15 -070045#ifdef CONFIG_X86_LOCAL_APIC
Chris Metcalf9a01c3e2016-10-07 17:02:45 -070046void arch_trigger_cpumask_backtrace(const struct cpumask *mask,
47 bool exclude_self);
Yi Wang89f579c2018-11-22 10:04:09 +080048
49extern __visible void smp_x86_platform_ipi(struct pt_regs *regs);
Chris Metcalf9a01c3e2016-10-07 17:02:45 -070050#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
Michel Lespinasseb52e0a72013-06-06 04:41:15 -070051#endif
52
H. Peter Anvin1965aae2008-10-22 22:26:29 -070053#endif /* _ASM_X86_IRQ_H */