From: yhe <[email protected]> kexec secondary kernel run at same address with old one. let cpu spin in data segment to avoid it's flushed while copy the new kernel.
Signed-off-by: Yongli He <[email protected]> --- arch/powerpc/kernel/head_44x.S | 7 +++++++ arch/powerpc/platforms/44x/acpx1.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index a211fe2..697c30b 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S @@ -1299,6 +1299,13 @@ swapper_pg_dir: .space PGD_TABLE_SIZE /* + * KEXEC secondary kernel will run at same address as old one + * spin in data segment avoid it's flushed by new kernel + */ +_GLOBAL(kexec_smp_wait) + b . + +/* * Room for two PTE pointers, usually the kernel and current user pointers * to their respective root page table. */ diff --git a/arch/powerpc/platforms/44x/acpx1.c b/arch/powerpc/platforms/44x/acpx1.c index b698275..b903787 100644 --- a/arch/powerpc/platforms/44x/acpx1.c +++ b/arch/powerpc/platforms/44x/acpx1.c @@ -90,13 +90,14 @@ static void __init acpx14xx_init_irq(void) #ifdef CONFIG_SMP #ifdef CONFIG_KEXEC atomic_t kexec_down_cpus = ATOMIC_INIT(0); +extern void kexec_smp_wait(void); void smp_acpx14xx_kexec_cpu_down(int crash_shutdown, int secondary) { local_irq_disable(); if (secondary) { atomic_inc(&kexec_down_cpus); - while (1); + kexec_smp_wait(); } } -- 1.8.3 _______________________________________________ linux-yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/linux-yocto
