* ARM kexec SMP problem using exynos4210
@ 2012-01-11 8:45 Joonyoung Shim
0 siblings, 0 replies; 6+ messages in thread
From: Joonyoung Shim @ 2012-01-11 8:45 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I have tested kexec to Nuri board using Exynos4210(Dual-core ARM
Cortex-A9) on the latest mainline kernel but i am facing one problem.
The kernel enabled SMP, kernel_kexec() calls machine_shutdown to stop
all cpus except current cpu and jumps to the new kernel but the kernel
is hanged soon.
I used cpu_down(1) to make disabled cpu1 instead of smp_send_stop of
machine_shutdown and it is booted successfully to new kernel.
Any ideas?
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* ARM kexec SMP problem using exynos4210
[not found] <4F0D49DD.80305@samsung.com>
@ 2012-01-11 10:06 ` Will Deacon
2012-01-11 10:23 ` Joonyoung Shim
0 siblings, 1 reply; 6+ messages in thread
From: Will Deacon @ 2012-01-11 10:06 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 11, 2012 at 08:35:41AM +0000, Joonyoung Shim wrote:
> Hi,
Hello [adding linux-arm-kernel],
> I have tested kexec to Nuri board using Exynos4210(Dual-core ARM
> Cortex-A9) on the latest mainline kernel but i am facing one problem.
>
> The kernel enabled SMP, kernel_kexec() calls machine_shutdown to stop
> all cpus except current cpu and jumps to the new kernel but the kernel
> is hanged soon.
>
> I used cpu_down(1) to make disabled cpu1 instead of smp_send_stop of
> machine_shutdown and it is booted successfully to new kernel.
>
> Any ideas?
I suspect that the secondary CPUs are not being parked correctly in the first
kernel. For this, you need to implement platform_cpu_kill for your platform.
Given that exynos just does:
int platform_cpu_kill(unsigned int cpu)
{
return 1;
}
then I'm not surprised it doesn't work. Try adding something in there which puts
the CPU into a state where it can be booted by the next kernel.
I considered adding a purely software mechanism for doing this (in fact, I
prototyped something up on vexpress) but after discussions with some board
maintainers it became clear that most SMP SoCs have hardware assists for
hotplug, and the software approach is really only need for things like the
ARM development boards.
Will
^ permalink raw reply [flat|nested] 6+ messages in thread
* ARM kexec SMP problem using exynos4210
2012-01-11 10:06 ` ARM kexec SMP problem using exynos4210 Will Deacon
@ 2012-01-11 10:23 ` Joonyoung Shim
2012-01-11 11:03 ` Will Deacon
0 siblings, 1 reply; 6+ messages in thread
From: Joonyoung Shim @ 2012-01-11 10:23 UTC (permalink / raw)
To: linux-arm-kernel
On 01/11/2012 07:06 PM, Will Deacon wrote:
> On Wed, Jan 11, 2012 at 08:35:41AM +0000, Joonyoung Shim wrote:
>> Hi,
> Hello [adding linux-arm-kernel],
>
>> I have tested kexec to Nuri board using Exynos4210(Dual-core ARM
>> Cortex-A9) on the latest mainline kernel but i am facing one problem.
>>
>> The kernel enabled SMP, kernel_kexec() calls machine_shutdown to stop
>> all cpus except current cpu and jumps to the new kernel but the kernel
>> is hanged soon.
>>
>> I used cpu_down(1) to make disabled cpu1 instead of smp_send_stop of
>> machine_shutdown and it is booted successfully to new kernel.
>>
>> Any ideas?
> I suspect that the secondary CPUs are not being parked correctly in the first
> kernel. For this, you need to implement platform_cpu_kill for your platform.
>
> Given that exynos just does:
>
> int platform_cpu_kill(unsigned int cpu)
> {
> return 1;
> }
>
> then I'm not surprised it doesn't work. Try adding something in there which puts
> the CPU into a state where it can be booted by the next kernel.
Thanks, i will try it.
One more question, generally boot cpu is first cpu(cpu0). If current
cpu is secondary cpu(cpu1), smp_send_stop of machine_shutdown will stop
first cpu and next kernel will try to boot on secondary cpu. Is it
possible?
> I considered adding a purely software mechanism for doing this (in fact, I
> prototyped something up on vexpress) but after discussions with some board
> maintainers it became clear that most SMP SoCs have hardware assists for
> hotplug, and the software approach is really only need for things like the
> ARM development boards.
>
> Will
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* ARM kexec SMP problem using exynos4210
2012-01-11 10:23 ` Joonyoung Shim
@ 2012-01-11 11:03 ` Will Deacon
2012-01-11 17:20 ` McClintock Matthew-B29882
0 siblings, 1 reply; 6+ messages in thread
From: Will Deacon @ 2012-01-11 11:03 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 11, 2012 at 10:23:18AM +0000, Joonyoung Shim wrote:
> One more question, generally boot cpu is first cpu(cpu0). If current
> cpu is secondary cpu(cpu1), smp_send_stop of machine_shutdown will stop
> first cpu and next kernel will try to boot on secondary cpu. Is it
> possible?
I added the cpu_logical_map stuff for this, so the kernel can handle it.
That said, your platform may have restrictions about the boot CPU so if it
doesn't work, you'll need to taskset the kexec command to CPU 0.
Will
^ permalink raw reply [flat|nested] 6+ messages in thread
* ARM kexec SMP problem using exynos4210
2012-01-11 11:03 ` Will Deacon
@ 2012-01-11 17:20 ` McClintock Matthew-B29882
2012-01-11 17:42 ` Will Deacon
0 siblings, 1 reply; 6+ messages in thread
From: McClintock Matthew-B29882 @ 2012-01-11 17:20 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 11, 2012 at 5:03 AM, Will Deacon <will.deacon@arm.com> wrote:
> On Wed, Jan 11, 2012 at 10:23:18AM +0000, Joonyoung Shim wrote:
>> One more question, generally boot cpu is first cpu(cpu0). If current
>> cpu is secondary cpu(cpu1), smp_send_stop of machine_shutdown will stop
>> first cpu and next kernel will try to boot on secondary cpu. Is it
>> possible?
>
> I added the cpu_logical_map stuff for this, so the kernel can handle it.
> That said, your platform may have restrictions about the boot CPU so if it
> doesn't work, you'll need to taskset the kexec command to CPU 0.
Would this negatively effect kdump though where you might not be able
to switch back to cpu0? I think It's best to be able to boot on any
core.
-M
^ permalink raw reply [flat|nested] 6+ messages in thread
* ARM kexec SMP problem using exynos4210
2012-01-11 17:20 ` McClintock Matthew-B29882
@ 2012-01-11 17:42 ` Will Deacon
0 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2012-01-11 17:42 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 11, 2012 at 05:20:43PM +0000, McClintock Matthew-B29882 wrote:
> On Wed, Jan 11, 2012 at 5:03 AM, Will Deacon <will.deacon@arm.com> wrote:
> > On Wed, Jan 11, 2012 at 10:23:18AM +0000, Joonyoung Shim wrote:
> >> One more question, generally boot cpu is first cpu(cpu0). If current
> >> cpu is secondary cpu(cpu1), smp_send_stop of machine_shutdown will stop
> >> first cpu and next kernel will try to boot on secondary cpu. Is it
> >> possible?
> >
> > I added the cpu_logical_map stuff for this, so the kernel can handle it.
> > That said, your platform may have restrictions about the boot CPU so if it
> > doesn't work, you'll need to taskset the kexec command to CPU 0.
>
> Would this negatively effect kdump though where you might not be able
> to switch back to cpu0? I think It's best to be able to boot on any
> core.
Ideally, we would boot on any core. That's what the logical map is for. The
problem is that you may have hardware restrictions that prevent this (for
example, the secure monitor on OMAP4 is, I believe, only present on CPU 0).
Will
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-11 17:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4F0D49DD.80305@samsung.com>
2012-01-11 10:06 ` ARM kexec SMP problem using exynos4210 Will Deacon
2012-01-11 10:23 ` Joonyoung Shim
2012-01-11 11:03 ` Will Deacon
2012-01-11 17:20 ` McClintock Matthew-B29882
2012-01-11 17:42 ` Will Deacon
2012-01-11 8:45 Joonyoung Shim
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).