diff options
author | Benjamin Herrenschmidt <benh@ozlabs.org> | 2008-04-09 11:21:26 +0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-17 01:46:10 +0400 |
commit | 7c6352a4699e9a3a2d91b2cddbf3f1048207e904 (patch) | |
tree | 2f7be099bbe8a205096536ddddf1628573c92597 /arch/powerpc/kernel/paca.c | |
parent | 55045d47d7a8c4c61bc0ca6f2fac5087dd598bc3 (diff) | |
download | linux-7c6352a4699e9a3a2d91b2cddbf3f1048207e904.tar.xz |
[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>
Diffstat (limited to 'arch/powerpc/kernel/paca.c')
-rw-r--r-- | arch/powerpc/kernel/paca.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index 867b22d17385..ac163bd46cfd 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c @@ -73,6 +73,7 @@ struct slb_shadow slb_shadow[] __cacheline_aligned = { .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ .hw_cpu_id = 0xffff, \ .slb_shadow_ptr = &slb_shadow[number], \ + .__current = &init_task, \ } struct paca_struct paca[] = { |