Subject: Re: [PATCH] kexec, ppc64: Wait for online/possible CPUs only.

From: Michael Ellerman <[email-masked]>
Date: Wed, 09 Jun 2010 01:48:40 +1000

On Tue, 2010-06-08 at 17:38 +1000, Matt Evans wrote:
> kexec_perpare_cpus_wait() iterates i through NR_CPUS to check
> paca[i].kexec_state of each to make sure they have quiesced.
> However now we have dynamic PACA allocation, paca[NR_CPUS] is not necessarily
> valid and we overrun the array;  spurious "cpu is not possible, ignoring"
> errors result.  This patch iterates for_each_online_cpu so stays
> within the bounds of paca[] -- and every CPU is now 'possible'.
> 
> Signed-off-by: Matt Evans <[email-masked]>

Looks good ..

Cautiously-acked-by: Michael Ellerman <[email-masked]>

> -			if (!cpu_online(i)) {
> -				/* Fixme: this can be spinning in
> -				 * pSeries_secondary_wait with a paca
> -				 * waiting for it to go online.
> -				 */
> -				printk("kexec: cpu %d hw_cpu_id %d is not"
> -						" online, ignoring\n",
> -						i, paca[i].hw_cpu_id);
> -				break;
> -			}

I don't see how the state in the Fixme could ever happen, but maybe
Milton can seeing I think he wrote it?

cheers