aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-05-06 20:00:56 -0400
committerPaul Mackerras <paulus@samba.org>2008-05-09 06:22:58 -0400
commit24d9649574fbe591fdfa6b00893d4096f513e539 (patch)
treede6b2a4b4e1d7754d4100404b4d74574be0a608e /arch
parent1b70c5a6491dd02263e6d104b72d9b536f987021 (diff)
[POWERPC] Document when printk is useable
When debugging early boot problems, it's common to sprinkle printk's all over the place. However, on 64-bit powerpc, this can lead to memory corruption if done too early due to the PACA pointer and lockdep core not being initialized. This adds some comments to early_setup() that document when it is safe to do so in order to save time for whoever has to debug that stuff next. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/setup_64.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 25e3fd8606ab..f2cd82eaf49d 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -170,6 +170,8 @@ void __init setup_paca(int cpu)
170 170
171void __init early_setup(unsigned long dt_ptr) 171void __init early_setup(unsigned long dt_ptr)
172{ 172{
173 /* -------- printk is _NOT_ safe to use here ! ------- */
174
173 /* Fill in any unititialised pacas */ 175 /* Fill in any unititialised pacas */
174 initialise_pacas(); 176 initialise_pacas();
175 177
@@ -185,6 +187,8 @@ void __init early_setup(unsigned long dt_ptr)
185 /* Initialize lockdep early or else spinlocks will blow */ 187 /* Initialize lockdep early or else spinlocks will blow */
186 lockdep_init(); 188 lockdep_init();
187 189
190 /* -------- printk is now safe to use ------- */
191
188 DBG(" -> early_setup(), dt_ptr: 0x%lx\n", dt_ptr); 192 DBG(" -> early_setup(), dt_ptr: 0x%lx\n", dt_ptr);
189 193
190 /* 194 /*