mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
x86/irq: Add and use NR_EXTERNAL_VECTORS and NR_SYSTEM_VECTORS
Add defines for the number of external vectors and number of system vectors instead of requiring the use of (FIRST_SYSTEM_VECTOR - FIRST_EXTERNAL_VECTOR) and (NR_VECTORS - FIRST_SYSTEM_VECTOR) respectively. Clean up the usage sites. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Andy Lutomirski <luto@kernel.org> Link: https://lore.kernel.org/r/20210519212154.511983-3-hpa@zytor.com
This commit is contained in:
parent
f1b7d45d3f
commit
ff85100388
@ -504,7 +504,7 @@ __visible noinstr void func(struct pt_regs *regs, \
|
||||
.align 8
|
||||
SYM_CODE_START(irq_entries_start)
|
||||
vector=FIRST_EXTERNAL_VECTOR
|
||||
.rept (FIRST_SYSTEM_VECTOR - FIRST_EXTERNAL_VECTOR)
|
||||
.rept NR_EXTERNAL_VECTORS
|
||||
UNWIND_HINT_IRET_REGS
|
||||
0 :
|
||||
.byte 0x6a, vector
|
||||
@ -520,7 +520,7 @@ SYM_CODE_END(irq_entries_start)
|
||||
.align 8
|
||||
SYM_CODE_START(spurious_entries_start)
|
||||
vector=FIRST_SYSTEM_VECTOR
|
||||
.rept (NR_VECTORS - FIRST_SYSTEM_VECTOR)
|
||||
.rept NR_SYSTEM_VECTORS
|
||||
UNWIND_HINT_IRET_REGS
|
||||
0 :
|
||||
.byte 0x6a, vector
|
||||
|
@ -114,6 +114,9 @@
|
||||
#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.
|
||||
*
|
||||
|
@ -114,6 +114,9 @@
|
||||
#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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user