* ARM: shmobile: sh73a0: CPU1 failed to come online (Re: [PATCH 0/4] ARM: shmobile: r8a7740/armadillo:
@ 2014-11-17 13:57 Geert Uytterhoeven
2014-11-17 15:12 ` ARM: shmobile: sh73a0: CPU1 failed to come online (Re: [PATCH 0/4] ARM: shmobile: r8a7740/armadi Russell King - ARM Linux
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-11-17 13:57 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 17, 2014 at 2:53 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> This patch series migrates the DT-based generic r8a7740 platform and the
> armadillo legacy platform from calling l2x0_of_init() to the generic l2c OF
> initialization.
>
> Note that this conversion should be applied to sh73a0, r8a7778, and r8a7779,
> too. More about sh73a0 later.
I tried to convert sh73a0, but it doesn't work, due to problems
bringing up the second
CPU core.
Details:
- l2x0_of_init() is called much earlier than l2x0_init().
When the L2 cache is enabled, initialization of the second CPU core of
sh73a0 (Dual-core Cortex-A9) fails.
- As jiffies are not yet incrementing at that point (they are on r8a7791?),
timeouts don't work, and the kernel hangs at the
wait_for_completion_timeout() call in arch/arm/kernel/smp.c:__cpu_up().
- This may be related to the intermittent failure to bring up the second
CPU core when resuming from s2ram:
CPU1: failed to come online
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: ARM: shmobile: sh73a0: CPU1 failed to come online (Re: [PATCH 0/4] ARM: shmobile: r8a7740/armadi
2014-11-17 13:57 ARM: shmobile: sh73a0: CPU1 failed to come online (Re: [PATCH 0/4] ARM: shmobile: r8a7740/armadillo: Geert Uytterhoeven
@ 2014-11-17 15:12 ` Russell King - ARM Linux
2015-01-13 9:41 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2014-11-17 15:12 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 17, 2014 at 02:57:46PM +0100, Geert Uytterhoeven wrote:
> I tried to convert sh73a0, but it doesn't work, due to problems
> bringing up the second
> CPU core.
>
> Details:
> - l2x0_of_init() is called much earlier than l2x0_init().
> When the L2 cache is enabled, initialization of the second CPU core of
> sh73a0 (Dual-core Cortex-A9) fails.
Missing L2 cache flushes for (any) the secondary core data/trampoline?
> - As jiffies are not yet incrementing at that point (they are on r8a7791?),
> timeouts don't work, and the kernel hangs at the
> wait_for_completion_timeout() call in arch/arm/kernel/smp.c:__cpu_up().
That sounds bad:
start_kernel() -> rest_init() -> kernel_thread(kernel_init)
kernel_init() -> kernel_init_freeable() -> smp_init() -> (for each CPU) cpu_up()
By the time we get to rest_init(), init_IRQ(), time_init(),
local_irq_enable(), late_time_init(), calibrate_delay(), etc have all
been called, so if jiffies is not incrementing in __cpu_up(), that's
a big problem.
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ARM: shmobile: sh73a0: CPU1 failed to come online (Re: [PATCH 0/4] ARM: shmobile: r8a7740/armadi
2014-11-17 15:12 ` ARM: shmobile: sh73a0: CPU1 failed to come online (Re: [PATCH 0/4] ARM: shmobile: r8a7740/armadi Russell King - ARM Linux
@ 2015-01-13 9:41 ` Geert Uytterhoeven
0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2015-01-13 9:41 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 17, 2014 at 4:12 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Mon, Nov 17, 2014 at 02:57:46PM +0100, Geert Uytterhoeven wrote:
>> I tried to convert sh73a0, but it doesn't work, due to problems
>> bringing up the second
>> CPU core.
>>
>> Details:
>> - l2x0_of_init() is called much earlier than l2x0_init().
>> When the L2 cache is enabled, initialization of the second CPU core of
>> sh73a0 (Dual-core Cortex-A9) fails.
>
> Missing L2 cache flushes for (any) the secondary core data/trampoline?
Thanks, I added a few cache flushes, so far it didn't help...
>> - As jiffies are not yet incrementing at that point (they are on r8a7791?),
>> timeouts don't work, and the kernel hangs at the
>> wait_for_completion_timeout() call in arch/arm/kernel/smp.c:__cpu_up().
>
> That sounds bad:
>
> start_kernel() -> rest_init() -> kernel_thread(kernel_init)
>
> kernel_init() -> kernel_init_freeable() -> smp_init() -> (for each CPU) cpu_up()
>
> By the time we get to rest_init(), init_IRQ(), time_init(),
> local_irq_enable(), late_time_init(), calibrate_delay(), etc have all
> been called, so if jiffies is not incrementing in __cpu_up(), that's
> a big problem.
That was due to the missing arm,cortex-a9-twd-timer timer, which also
broke CONFIG_CPU_IDLE=y.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-13 9:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 13:57 ARM: shmobile: sh73a0: CPU1 failed to come online (Re: [PATCH 0/4] ARM: shmobile: r8a7740/armadillo: Geert Uytterhoeven
2014-11-17 15:12 ` ARM: shmobile: sh73a0: CPU1 failed to come online (Re: [PATCH 0/4] ARM: shmobile: r8a7740/armadi Russell King - ARM Linux
2015-01-13 9:41 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).