/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_IRQ_VECTORS_H
#define _ASM_X86_IRQ_VECTORS_H
#include <linux/threads.h>
/*
* Linux IRQ vector layout .
*
* There are 256 IDT entries ( per CPU - each entry is 8 bytes ) which can
* be defined by Linux . They are used as a jump table by the CPU when a
* given vector is triggered - by a CPU - external , CPU - internal or
* software - triggered event .
*
* Linux sets the kernel code address each entry jumps to early during
* bootup , and never changes them . This is the general layout of the
* IDT entries :
*
* Vectors 0 . . . 31 : system traps and exceptions - hardcoded events
* Vectors 32 . . . 127 : device interrupts
* Vector 128 : legacy int80 syscall interface
* Vectors 129 . . . FIRST_SYSTEM_VECTOR - 1 : device interrupts
* Vectors FIRST_SYSTEM_VECTOR . . . 255 : special interrupts
*
* 64 - bit x86 has per CPU IDT tables , 32 - bit has one shared IDT table .
*
* This file enumerates the exact layout of them :
*/
/* This is used as an interrupt vector when programming the APIC. */
#define NMI_VECTOR 0 x02
/*
* IDT vectors usable for external interrupt sources start at 0 x20 .
* ( 0 x80 is the syscall vector , 0 x30 - 0 x3f are for ISA )
*/
#define FIRST_EXTERNAL_VECTOR 0 x20
#define IA32_SYSCALL_VECTOR 0 x80
/*
* Vectors 0 x30 - 0 x3f are used for ISA interrupts .
* round up to the next 16 - vector boundary
*/
#define ISA_IRQ_VECTOR(irq) (((FIRST_EXTERNAL_VECTOR + 16 ) & ~15 ) + irq)
/*
* Special IRQ vectors used by the SMP architecture , 0 xf0 - 0 xff
*
* some of the following vectors are ' rare ' , they are merged
* into a single vector ( CALL_FUNCTION_VECTOR ) to save vector space .
* TLB , reschedule and local APIC vectors are performance - critical .
*/
#define SPURIOUS_APIC_VECTOR 0 xff
/*
* Sanity check
*/
#if ((SPURIOUS_APIC_VECTOR & 0 x0F) != 0 x0F)
# error SPURIOUS_APIC_VECTOR definition error
#endif
#define ERROR_APIC_VECTOR 0 xfe
#define RESCHEDULE_VECTOR 0 xfd
#define CALL_FUNCTION_VECTOR 0 xfc
#define CALL_FUNCTION_SINGLE_VECTOR 0 xfb
#define THERMAL_APIC_VECTOR 0 xfa
#define THRESHOLD_APIC_VECTOR 0 xf9
#define REBOOT_VECTOR 0 xf8
/*
* Generic system vector for platform specific use
*/
#define X86_PLATFORM_IPI_VECTOR 0 xf7
/*
* IRQ work vector :
*/
#define IRQ_WORK_VECTOR 0 xf6
/* 0xf5 - unused, was UV_BAU_MESSAGE */
#define DEFERRED_ERROR_VECTOR 0 xf4
/* Vector on which hypervisor callbacks will be delivered */
#define HYPERVISOR_CALLBACK_VECTOR 0 xf3
/* Vector for KVM to deliver posted interrupt IPI */
#define POSTED_INTR_VECTOR 0 xf2
#define POSTED_INTR_WAKEUP_VECTOR 0 xf1
#define POSTED_INTR_NESTED_VECTOR 0 xf0
#define MANAGED_IRQ_SHUTDOWN_VECTOR 0 xef
#if IS_ENABLED(CONFIG_HYPERV)
#define HYPERV_REENLIGHTENMENT_VECTOR 0 xee
#define HYPERV_STIMER0_VECTOR 0 xed
#endif
#define LOCAL_TIMER_VECTOR 0 xec
/*
* Posted interrupt notification vector for all device MSIs delivered to
* the host kernel .
*/
#define POSTED_MSI_NOTIFICATION_VECTOR 0 xeb
#define NR_VECTORS 256
#ifdef CONFIG_X86_LOCAL_APIC
#define FIRST_SYSTEM_VECTOR POSTED_MSI_NOTIFICATION_VECTOR
#else
#define FIRST_SYSTEM_VECTOR NR_VECTORS
#endif
#define NR_EXTERNAL_VECTORS (FIRST_SYSTEM_VECTOR - FIRST_EXTERNAL_VECTOR)
#define NR_SYSTEM_VECTORS (NR_VECTORS - FIRST_SYSTEM_VECTOR)
/*
* Size the maximum number of interrupts .
*
* If the irq_desc [ ] array has a sparse layout , we can size things
* generously - it scales up linearly with the maximum number of CPUs ,
* and the maximum number of IO - APICs , whichever is higher .
*
* In other cases we size more conservatively , to not create too large
* static arrays .
*/
#define NR_IRQS_LEGACY 16
#define CPU_VECTOR_LIMIT (64 * NR_CPUS)
#define IO_APIC_VECTOR_LIMIT (32 * MAX_IO_APICS)
#if defined (CONFIG_X86_IO_APIC) && defined (CONFIG_PCI_MSI)
#define NR_IRQS \
(CPU_VECTOR_LIMIT > IO_APIC_VECTOR_LIMIT ? \
(NR_VECTORS + CPU_VECTOR_LIMIT) : \
(NR_VECTORS + IO_APIC_VECTOR_LIMIT))
#elif defined (CONFIG_X86_IO_APIC)
#define NR_IRQS (NR_VECTORS + IO_APIC_VECTOR_LIMIT)
#elif defined (CONFIG_PCI_MSI)
#define NR_IRQS (NR_VECTORS + CPU_VECTOR_LIMIT)
#else
#define NR_IRQS NR_IRQS_LEGACY
#endif
#endif /* _ASM_X86_IRQ_VECTORS_H */
Messung V0.5 in Prozent C=91 H=100 G=95
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-09-28)
¤
*© Formatika GbR, Deutschland