[PATCH] powerpc/kexec: Enable SMT before waking offline CPUs

Srikar Dronamraju srikar at linux.ibm.com
Tue Oct 28 15:08:38 AEDT 2025


* Nysal Jan K.A. <nysal at linux.ibm.com> [2025-10-25 13:35:09]:

> diff --git a/arch/powerpc/kexec/core_64.c b/arch/powerpc/kexec/core_64.c
> index 222aa326dace..ff6df43720c4 100644
> --- a/arch/powerpc/kexec/core_64.c
> +++ b/arch/powerpc/kexec/core_64.c
> @@ -216,6 +216,11 @@ static void wake_offline_cpus(void)
>  {
>  	int cpu = 0;
>  
> +	lock_device_hotplug();
> +	cpu_smt_num_threads = threads_per_core;
> +	cpu_smt_control = CPU_SMT_ENABLED;
> +	unlock_device_hotplug();
> +

Nit: can we add a comment mentioning why we do it and probably move to a
small helper function of its own.

Otherwise looks good.

Reviewed-by: Srikar Dronamraju <srikar at linux.ibm.com>

>  	for_each_present_cpu(cpu) {
>  		if (!cpu_online(cpu)) {
>  			printk(KERN_INFO "kexec: Waking offline cpu %d.\n",

-- 
Thanks and Regards
Srikar Dronamraju


More information about the Linuxppc-dev mailing list