ARM: bL_switcher: wait until inbound is alive before performing a switch
authorNicolas Pitre <nicolas.pitre@linaro.org>
Fri, 14 Jun 2013 03:51:18 +0000 (23:51 -0400)
committerNicolas Pitre <nicolas.pitre@linaro.org>
Thu, 20 Jun 2013 04:45:00 +0000 (00:45 -0400)
commit976e214051cea025f8f55624b254a4e8fe44cd53
treeb6130b605c30b73bd0d325d536ebf173c86d97b7
parentcfc3179ae13ba52b15e9c8fa9ed805141d09e7d9
ARM: bL_switcher: wait until inbound is alive before performing a switch

In some cases, a significant delay may be observed between the moment
a request for a CPU to come up is made and the moment it is ready to
start executing kernel code.  This is especially true when a whole
cluster has to be powered up which may take in the order of miliseconds.
It is therefore a good idea to let the outbound CPU continue to execute
code in the mean time, and be notified when the inbound is ready before
performing the actual switch.

This is achieved by registering a completion block with the appropriate
IPI callback, and programming the sending of an IPI by the early assembly
code prior to entering the main kernel code.  Once the IPI is delivered
to the outbound CPU, the completion block is "completed" and the switcher
thread is resumed.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
arch/arm/common/bL_switcher.c