blob: 768aa234cbb4a6c2fb3c6362156825e11ee046d1 [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
Thomas Gleixnerf0178fc2020-06-10 08:37:01 +020014/*
15 * The irq entry code is in the noinstr section and the start/end of
16 * __irqentry_text is emitted via labels. Make the build fail if
17 * something moves a C function into the __irq_entry section.
18 */
19#define __irq_entry __invalid_section
20
Thomas Gleixner22067d42008-05-02 22:14:44 +020021static inline int irq_canonicalize(int irq)
22{
23 return ((irq == 2) ? 9 : irq);
24}
25
Thomas Gleixner66c7ceb2019-04-14 18:00:04 +020026extern int irq_init_percpu_irqstack(unsigned int cpu);
Thomas Gleixner22067d42008-05-02 22:14:44 +020027
Thomas Gleixner90a22822015-12-31 16:30:53 +000028struct irq_desc;
29
Mike Travisd7b381b2008-12-16 17:33:58 -080030extern void fixup_irqs(void);
Thomas Gleixner22067d42008-05-02 22:14:44 +020031
Feng Wuf6b3c72c2015-05-19 17:07:16 +080032#ifdef CONFIG_HAVE_KVM
33extern void kvm_set_posted_intr_wakeup_handler(void (*handler)(void));
34#endif
35
Dimitri Sivanich4a4de9c2009-10-14 09:22:57 -050036extern void (*x86_platform_ipi_callback)(void);
Thomas Gleixner22067d42008-05-02 22:14:44 +020037extern void native_init_IRQ(void);
Thomas Gleixnera782a7e2015-08-02 20:38:27 +000038
Thomas Gleixner7c2a5732020-05-21 22:05:35 +020039extern void __handle_irq(struct irq_desc *desc, struct pt_regs *regs);
Thomas Gleixner22067d42008-05-02 22:14:44 +020040
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
Chris Metcalf9a01c3e2016-10-07 17:02:45 -070049#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
Michel Lespinasseb52e0a72013-06-06 04:41:15 -070050#endif
51
H. Peter Anvin1965aae2008-10-22 22:26:29 -070052#endif /* _ASM_X86_IRQ_H */