18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ASM_X86_IRQ_H
38c2ecf20Sopenharmony_ci#define _ASM_X86_IRQ_H
48c2ecf20Sopenharmony_ci/*
58c2ecf20Sopenharmony_ci *	(C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci *	IRQ/IPI changes taken from work by Thomas Radke
88c2ecf20Sopenharmony_ci *	<tomsoft@informatik.tu-chemnitz.de>
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <asm/apicdef.h>
128c2ecf20Sopenharmony_ci#include <asm/irq_vectors.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/*
158c2ecf20Sopenharmony_ci * The irq entry code is in the noinstr section and the start/end of
168c2ecf20Sopenharmony_ci * __irqentry_text is emitted via labels. Make the build fail if
178c2ecf20Sopenharmony_ci * something moves a C function into the __irq_entry section.
188c2ecf20Sopenharmony_ci */
198c2ecf20Sopenharmony_ci#define __irq_entry __invalid_section
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_cistatic inline int irq_canonicalize(int irq)
228c2ecf20Sopenharmony_ci{
238c2ecf20Sopenharmony_ci	return ((irq == 2) ? 9 : irq);
248c2ecf20Sopenharmony_ci}
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciextern int irq_init_percpu_irqstack(unsigned int cpu);
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#define __ARCH_HAS_DO_SOFTIRQ
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_cistruct irq_desc;
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciextern void fixup_irqs(void);
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci#ifdef CONFIG_HAVE_KVM
358c2ecf20Sopenharmony_ciextern void kvm_set_posted_intr_wakeup_handler(void (*handler)(void));
368c2ecf20Sopenharmony_ci#endif
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciextern void (*x86_platform_ipi_callback)(void);
398c2ecf20Sopenharmony_ciextern void native_init_IRQ(void);
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciextern void __handle_irq(struct irq_desc *desc, struct pt_regs *regs);
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciextern __visible void do_IRQ(struct pt_regs *regs, unsigned long vector);
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ciextern void init_ISA_irqs(void);
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ciextern void __init init_IRQ(void);
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci#ifdef CONFIG_X86_LOCAL_APIC
508c2ecf20Sopenharmony_civoid arch_trigger_cpumask_backtrace(const struct cpumask *mask,
518c2ecf20Sopenharmony_ci				    bool exclude_self);
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
548c2ecf20Sopenharmony_ci#endif
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#endif /* _ASM_X86_IRQ_H */
57