Re: [PATCH 02/12] powermac: support G5 CPU hotplug

Paul Mackerras
2007-02-08T21:59:53Z

Johannes Berg writes:

> +#ifdef CONFIG_CPU_HOTPLUG
> + /* if we have fake CPU hotplug just to support suspend to disk
> + * and can't really turn off a CPU, it may be taking timer interrupts
> + * even when it is dead. Avoid doing anything in that case so global
> + * state is not modified for and by a CPU that doesn't really exist. */
> + if (__get_cpu_var(cpu_state) == CPU_DEAD)
> + return;
> +#endif

Are you sure this is necessary? IIRC, the if (!cpu_is_offline(cpu)) a
little bit further down is there to cope with this exact situation.
And cpu hotplug already works on G4 SMP powermacs, where we can't
physically remove the cpu either - we just put it into sleep mode with
interrupts disabled, which is what we would be doing on a G5 powermac
also.

Paul.