]> bbs.cooldavid.org Git - net-next-2.6.git/commit
powerpc/kexec: Wait for online/possible CPUs only.
authorMatt Evans <matt@ozlabs.org>
Mon, 7 Jun 2010 21:38:18 +0000 (21:38 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 15 Jun 2010 05:02:33 +0000 (15:02 +1000)
commitb636f1379eefe6eba931deaa386605bc7ac623e7
tree482289c45853b5f86f264dd8f98b0f70c94fa4d5
parent65cf840ff4b63852d34d577d559978ccfc554a6c
powerpc/kexec: Wait for online/possible CPUs only.

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 <matt@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/machine_kexec_64.c