]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] Initialize paca->current earlier
authorBenjamin Herrenschmidt <benh@ozlabs.org>
Wed, 9 Apr 2008 07:21:26 +0000 (17:21 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 16 Apr 2008 21:46:10 +0000 (07:46 +1000)
commit41be2b944a15ad526dd1f4ba999c38cb44f3d655
tree2f7be099bbe8a205096536ddddf1628573c92597
parentb456aad4a71b4dc16c07552312b5265bdb3dc0b5
[POWERPC] Initialize paca->current earlier

Currently, we initialize the "current" pointer in the PACA (which
is used by the "current" macro in the kernel) before calling
setup_system(). That means that early_setup() is called with
current still "NULL" which is -not- a good idea. It happens to
work so far but breaks with lockdep when early code calls printk.

This changes it so that all PACAs are statically initialized with
__current pointing to the init task. For non-0 CPUs, this is fixed
up before use.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/paca.c