mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
x86: 32 bit: interrupt stub consistency with 64 bit
Don't generate interrupt stubs for interrupt vectors below FIRST_EXTERNAL_VECTOR, and make the table of interrupt vectors (interrupt[]) __initconst. Both of these changes both conserve memory and improve consistency with 64 bits. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
f21f237cf5
commit
4687518c4c
@ -110,7 +110,7 @@ extern asmlinkage void smp_invalidate_interrupt(struct pt_regs *);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
extern void (*const interrupt[NR_VECTORS])(void);
|
extern void (*__initconst interrupt[NR_VECTORS-FIRST_EXTERNAL_VECTOR])(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef int vector_irq_t[NR_VECTORS];
|
typedef int vector_irq_t[NR_VECTORS];
|
||||||
|
@ -622,16 +622,16 @@ END(syscall_badsys)
|
|||||||
* Build the entry stubs and pointer table with
|
* Build the entry stubs and pointer table with
|
||||||
* some assembler magic.
|
* some assembler magic.
|
||||||
*/
|
*/
|
||||||
.section .rodata,"a"
|
.section .init.rodata,"a"
|
||||||
ENTRY(interrupt)
|
ENTRY(interrupt)
|
||||||
.text
|
.text
|
||||||
|
|
||||||
ENTRY(irq_entries_start)
|
ENTRY(irq_entries_start)
|
||||||
RING0_INT_FRAME
|
RING0_INT_FRAME
|
||||||
vector=0
|
vector=FIRST_EXTERNAL_VECTOR
|
||||||
.rept NR_VECTORS
|
.rept NR_VECTORS
|
||||||
ALIGN
|
ALIGN
|
||||||
.if vector
|
.if vector != FIRST_EXTERNAL_VECTOR
|
||||||
CFI_ADJUST_CFA_OFFSET -4
|
CFI_ADJUST_CFA_OFFSET -4
|
||||||
.endif
|
.endif
|
||||||
1: pushl $~(vector)
|
1: pushl $~(vector)
|
||||||
|
@ -129,7 +129,7 @@ void __init native_init_IRQ(void)
|
|||||||
for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
|
for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
|
||||||
/* SYSCALL_VECTOR was reserved in trap_init. */
|
/* SYSCALL_VECTOR was reserved in trap_init. */
|
||||||
if (i != SYSCALL_VECTOR)
|
if (i != SYSCALL_VECTOR)
|
||||||
set_intr_gate(i, interrupt[i]);
|
set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -590,7 +590,8 @@ static void __init lguest_init_IRQ(void)
|
|||||||
* a straightforward 1 to 1 mapping, so force that here. */
|
* a straightforward 1 to 1 mapping, so force that here. */
|
||||||
__get_cpu_var(vector_irq)[vector] = i;
|
__get_cpu_var(vector_irq)[vector] = i;
|
||||||
if (vector != SYSCALL_VECTOR) {
|
if (vector != SYSCALL_VECTOR) {
|
||||||
set_intr_gate(vector, interrupt[vector]);
|
set_intr_gate(vector,
|
||||||
|
interrupt[vector-FIRST_EXTERNAL_VECTOR]);
|
||||||
set_irq_chip_and_handler_name(i, &lguest_irq_controller,
|
set_irq_chip_and_handler_name(i, &lguest_irq_controller,
|
||||||
handle_level_irq,
|
handle_level_irq,
|
||||||
"level");
|
"level");
|
||||||
|
Loading…
Reference in New Issue
Block a user