multiboot_ptr should be in __initdata - it is only used on the BSP path.
Furthermore, the .align 8 then .long means that stack_start is misaligned.
Move both into setup.c, which lets the compiler handle the details correctly,
as well as providing proper debug information for them.
Declare stack_start in setup.h and avoid extern-ing it locally in smpboot.c.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
call __start_xen
BUG /* __start_xen() shouldn't return. */
- .data
- .align 8
-multiboot_ptr:
- .long 0
-
-GLOBAL(stack_start)
- .quad cpu0_stack + STACK_SIZE - CPUINFO_sizeof
-
.section .data.page_aligned, "aw", @progbits
.align PAGE_SIZE, 0
/*
char __section(".bss.stack_aligned") __aligned(STACK_SIZE)
cpu0_stack[STACK_SIZE];
+/* Used by the BSP/AP paths to find the higher half stack mapping to use. */
+void *stack_start = cpu0_stack + STACK_SIZE - sizeof(struct cpu_info);
+
+/* Used by the boot asm to stash the relocated multiboot info pointer. */
+unsigned int __initdata multiboot_ptr;
+
struct cpuinfo_x86 __read_mostly boot_cpu_data = { 0, 0, 0, 0, -1 };
unsigned long __read_mostly mmu_cr4_features = XEN_MINIMAL_CR4;
#include <asm/microcode.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
+#include <asm/setup.h>
#include <asm/spec_ctrl.h>
#include <asm/time.h>
#include <asm/tboot.h>
startup_cpu_idle_loop();
}
-extern void *stack_start;
-
static int wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
{
unsigned long send_status = 0, accept_status = 0;
extern unsigned long xenheap_initial_phys_start;
extern uint64_t boot_tsc_stamp;
+extern void *stack_start;
+
void early_cpu_init(void);
void early_time_init(void);