From e5facfba3d2dba679d72c859066260eb0d33456c Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 4 Apr 2021 16:46:19 +0200 Subject: SMP: fix getting the interrupt stack address and size * i386/i386at/boothdr.S (_eintstack): Add missing common. * i386/xen/xen_boothdr.S (_eintstack): Add missing common. * x86_64/xen/xen_boothdr.S (_eintstack): Add missing common. * i386/i386/mp_desc.c (intstack, eintstack): Add missing underscore. --- i386/i386/mp_desc.c | 8 ++++---- i386/i386at/boothdr.S | 1 + i386/xen/xen_boothdr.S | 1 + x86_64/xen_boothdr.S | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index 070a5388..e4bc12de 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@ -62,8 +62,8 @@ vm_offset_t int_stack_high; /* * First cpu`s interrupt stack. */ -char intstack[]; /* bottom */ -char eintstack[]; /* top */ +extern char _intstack[]; /* bottom */ +extern char _eintstack[]; /* top */ /* * Multiprocessor i386/i486 systems use a separate copy of the @@ -202,8 +202,8 @@ interrupt_stack_alloc(void) */ for (i = 0; i < NCPUS; i++) { if (i == master_cpu) { - interrupt_stack[i] = (vm_offset_t) intstack; - int_stack_top[i] = (vm_offset_t) eintstack; + interrupt_stack[i] = (vm_offset_t) _intstack; + int_stack_top[i] = (vm_offset_t) _eintstack; } else if (machine_slot[i].is_cpu) { interrupt_stack[i] = stack_start; diff --git a/i386/i386at/boothdr.S b/i386/i386at/boothdr.S index 9339cb91..82d4b34a 100644 --- a/i386/i386at/boothdr.S +++ b/i386/i386at/boothdr.S @@ -92,6 +92,7 @@ iplt_done: call EXT(c_boot_entry) .comm _intstack,INTSTACK_SIZE + .comm _eintstack,0 .align 16 .word 0 diff --git a/i386/xen/xen_boothdr.S b/i386/xen/xen_boothdr.S index ac6ad25d..4704c66f 100644 --- a/i386/xen/xen_boothdr.S +++ b/i386/xen/xen_boothdr.S @@ -204,4 +204,5 @@ ldt: stack: .long _intstack+INTSTACK_SIZE,0xe021 .comm _intstack,INTSTACK_SIZE + .comm _eintstack,0 diff --git a/x86_64/xen_boothdr.S b/x86_64/xen_boothdr.S index 5208f627..da40a5c0 100644 --- a/x86_64/xen_boothdr.S +++ b/x86_64/xen_boothdr.S @@ -186,4 +186,5 @@ ldt: stack: .comm _intstack,INTSTACK_SIZE + .comm _eintstack,0 -- cgit v1.2.3