blob: 2395bb794c7bb89211abb69a3f6deab2abf4d132 [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
Christoph Hellwig79748912010-06-28 14:15:54 +020019#ifdef CONFIG_X86_32
20extern void irq_ctx_init(int cpu);
Thomas Gleixner22067d42008-05-02 22:14:44 +020021#else
22# define irq_ctx_init(cpu) do { } while (0)
Thomas Gleixner22067d42008-05-02 22:14:44 +020023#endif
24
Christoph Hellwig79748912010-06-28 14:15:54 +020025#define __ARCH_HAS_DO_SOFTIRQ
26
Thomas Gleixner90a22822015-12-31 16:30:53 +000027struct irq_desc;
28
Mike Travisd7b381b2008-12-16 17:33:58 -080029extern void fixup_irqs(void);
Thomas Gleixner22067d42008-05-02 22:14:44 +020030
Feng Wuf6b3c72c2015-05-19 17:07:16 +080031#ifdef CONFIG_HAVE_KVM
32extern void kvm_set_posted_intr_wakeup_handler(void (*handler)(void));
33#endif
34
Dimitri Sivanich4a4de9c2009-10-14 09:22:57 -050035extern void (*x86_platform_ipi_callback)(void);
Thomas Gleixner22067d42008-05-02 22:14:44 +020036extern void native_init_IRQ(void);
Thomas Gleixnera782a7e2015-08-02 20:38:27 +000037
Thomas Gleixnera782a7e2015-08-02 20:38:27 +000038extern bool handle_irq(struct irq_desc *desc, struct pt_regs *regs);
Thomas Gleixner22067d42008-05-02 22:14:44 +020039
Andi Kleen1d9090e2013-08-05 15:02:37 -070040extern __visible unsigned int do_IRQ(struct pt_regs *regs);
Jeremy Fitzhardinge7c1d7cd2009-02-06 14:09:41 -080041
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020042extern void init_ISA_irqs(void);
43
Michel Lespinasseb52e0a72013-06-06 04:41:15 -070044#ifdef CONFIG_X86_LOCAL_APIC
Chris Metcalf9a01c3e2016-10-07 17:02:45 -070045void arch_trigger_cpumask_backtrace(const struct cpumask *mask,
46 bool exclude_self);
47#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
Michel Lespinasseb52e0a72013-06-06 04:41:15 -070048#endif
49
H. Peter Anvin1965aae2008-10-22 22:26:29 -070050#endif /* _ASM_X86_IRQ_H */