* Tony Lindgren <tony@xxxxxxxxxxx> [100820 04:59]: > * Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> [100819 13:13]: > > On Thu, Aug 19, 2010 at 12:57:06PM +0300, Tony Lindgren wrote: > > > Looks like something is not quite right with smp_on_up part of __fixup_smp, > > > returning early before smp_on_up does not produce that. > > > > It's probably overwriting some register it shouldn't be. I might be > > able to look at this sometime during the coming week... assuming that > > the weather is as bad as they forecast and I have 'net connectivity. This seems to fix it. Tony
From: Tony Lindgren <tony@xxxxxxxxxxx> Date: Mon, 30 Aug 2010 13:52:52 -0700 Subject: [PATCH] ARM: Fix smp_on_up to not trash r1 and r2 We need to preserve r1 and r2 for __mmap_switched. So use r3, r6, r7 instead of r1, r2, r3. We can trash r3, r6, r7 as they get corrupted in __create_page_tables anyways. Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx> --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -353,14 +353,14 @@ __fixup_smp: smp_on_up: adr r0, 1f - ldmia r0, {r1, r2, r3} - sub r1, r0, r1 - add r2, r2, r1 - add r3, r3, r1 -2: cmp r2, r3 - ldmia r2!, {r0, r4} + ldmia r0, {r3, r6, r7} + sub r3, r0, r3 + add r6, r6, r3 + add r7, r7, r3 +2: cmp r6, r7 + ldmia r6!, {r0, r4} movhs pc, lr - str r4, [r0, r1] + str r4, [r0, r3] b 2b ENDPROC(__fixup_smp)