[PATCH 1/2] arm64: smp: Add function to determine if cpus are stuck in the kernel

Geoff Levand geoff at infradead.org
Fri Jun 17 09:37:12 PDT 2016


On Fri, 2016-06-17 at 10:34 +0100, James Morse wrote:
> +bool cpus_are_stuck_in_kernel(void)
> +{
> +> 	> bool ret = !!cpus_stuck_in_kernel;
> +#ifdef CONFIG_HOTPLUG_CPU

How about using 'if (IS_ENABLED(CONFIG_HOTPLUG_CPU))' here?

> +	int any_cpu = raw_smp_processor_id();
> +
> +> 	> if (num_possible_cpus() > 1 && !cpu_ops[any_cpu]->cpu_die)
> +> 	> 	> ret = true;
> +#endif

-Geoff



More information about the linux-arm-kernel mailing list