mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 08:01:59 +00:00
3adee777ad
In order to facilitate parallel startup, start to eliminate some of the global variables passing information to CPUs in the startup path. However, start by introducing one more: smpboot_control. For now this merely holds the CPU# of the CPU which is coming up. Each CPU can then find its own per-cpu data, and everything else it needs can be found from there, allowing the other global variables to be removed. First to be removed is initial_stack. Each CPU can load %rsp from its current_task->thread.sp instead. That is already set up with the correct idle thread for APs. Set up the .sp field in INIT_THREAD on x86 so that the BSP also finds a suitable stack pointer in the static per-cpu data when coming up on first boot. On resume from S3, the CPU needs a temporary stack because its idle task is already active. Instead of setting initial_stack, the sleep code can simply set its own current->thread.sp to point to the temporary stack. Nobody else cares about ->thread.sp for a thread which is currently on a CPU, because the true value is actually in the %rsp register. Which is restored with the rest of the CPU context in do_suspend_lowlevel(). Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Usama Arif <usama.arif@bytedance.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Usama Arif <usama.arif@bytedance.com> Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com> Reviewed-by: David Woodhouse <dwmw@amazon.co.uk> Link: https://lore.kernel.org/r/20230316222109.1940300-7-usama.arif@bytedance.com |
||
---|---|---|
.. | ||
apic.c | ||
debugfs.c | ||
debugfs.h | ||
efi.c | ||
enlighten_hvm.c | ||
enlighten_pv.c | ||
enlighten_pvh.c | ||
enlighten.c | ||
grant-table.c | ||
irq.c | ||
Kconfig | ||
Makefile | ||
mmu_hvm.c | ||
mmu_pv.c | ||
mmu.c | ||
mmu.h | ||
multicalls.c | ||
multicalls.h | ||
p2m.c | ||
platform-pci-unplug.c | ||
pmu.c | ||
pmu.h | ||
setup.c | ||
smp_hvm.c | ||
smp_pv.c | ||
smp.c | ||
smp.h | ||
spinlock.c | ||
suspend_hvm.c | ||
suspend_pv.c | ||
suspend.c | ||
time.c | ||
trace.c | ||
vga.c | ||
xen-asm.S | ||
xen-head.S | ||
xen-ops.h |