From: Shaohua Li Date: Sat, 25 Jun 2005 21:55:05 +0000 (-0700) Subject: [PATCH] set cpu_state for CPU hotplug (ia64) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9fa06c26f7b7914c8cdf4d309b74df3151cc227;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] set cpu_state for CPU hotplug (ia64) Dead CPU notifies online CPU that it's dead using cpu_state variable. After switching to physical cpu hotplug, we forgot setting the variable. This patch fixes it. Currently only __cpu_die uses it. We changed other locations for consistency in case others use it. Signed-off-by: Shaohua Li Acked-by: Ashok Raj Cc: "Luck, Tony" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index a888ddc10f7d..623b0a546709 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c @@ -346,6 +346,7 @@ smp_callin (void) lock_ipi_calllock(); cpu_set(cpuid, cpu_online_map); unlock_ipi_calllock(); + per_cpu(cpu_state, cpuid) = CPU_ONLINE; smp_setup_percpu_timer(); @@ -611,6 +612,7 @@ void __devinit smp_prepare_boot_cpu(void) { cpu_set(smp_processor_id(), cpu_online_map); cpu_set(smp_processor_id(), cpu_callin_map); + per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; } /* @@ -775,6 +777,7 @@ __cpu_up (unsigned int cpu) if (cpu_isset(cpu, cpu_callin_map)) return -EINVAL; + per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; /* Processor goes to start_secondary(), sets online flag */ ret = do_boot_cpu(sapicid, cpu); if (ret < 0)