From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: tim@xen.org, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH] xen: arm: wait 1000ms for a CPU to come up, instead of forever
Date: Wed, 14 Jan 2015 14:27:22 +0000 [thread overview]
Message-ID: <54B67CCA.9060205@linaro.org> (raw)
In-Reply-To: <1421244060-1745-1-git-send-email-ian.campbell@citrix.com>
Hi Ian,
On 14/01/15 14:01, Ian Campbell wrote:
> Otherwise continue without it, which is preferable to the current
> infinite hang.
Nice!
> Slightly tweak the grammar of a comment in the same function.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> xen/arch/arm/smpboot.c | 26 ++++++++++++++++++++++++--
> 1 file changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
> index 14054ae..12538d4 100644
> --- a/xen/arch/arm/smpboot.c
> +++ b/xen/arch/arm/smpboot.c
> @@ -357,6 +357,7 @@ int __init cpu_up_send_sgi(int cpu)
> int __cpu_up(unsigned int cpu)
> {
> int rc;
> + s_time_t deadline;
>
> printk("Bringing up CPU%d\n", cpu);
>
> @@ -369,7 +370,7 @@ int __cpu_up(unsigned int cpu)
> /* Tell the remote CPU which stack to boot on. */
> init_data.stack = idle_vcpu[cpu]->arch.stack;
>
> - /* Tell the remote CPU what is it's logical CPU ID */
> + /* Tell the remote CPU what its logical CPU ID is. */
> init_data.cpuid = cpu;
>
> /* Open the gate for this CPU */
> @@ -386,12 +387,33 @@ int __cpu_up(unsigned int cpu)
> return rc;
> }
>
> - while ( !cpu_online(cpu) )
> + deadline = NOW() + MILLISECS(1000);
Most of cpu_up callbacks are waiting for the CPU to come back. I guess
this deadline is for the time to initialize the CPU for Xen? If so,
maybe you can add a comment for it.
Also, any reason for 1s?
> +
> + while ( !cpu_online(cpu) && NOW() < deadline )
> {
> cpu_relax();
> process_pending_softirqs();
> }
>
> + /*
> + * Nuke start of day info before checking one last time if the CPU
> + * actually came online.
> + *
> + * Doesn't completely avoid the posibility of it trying to
possibility
> + * progress with another CPUs stack etc, but better than nothing,
> + * hopefully.
> + */
> + init_data.stack = NULL;
> + init_data.cpuid = ~0;
> + smp_up_cpu = MPIDR_INVALID;
> + clean_dcache(smp_up_cpu);
I don't understand why you need to do this. Is it for pure clean up? If
so, please explain it in the commit message.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2015-01-14 14:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 14:01 [PATCH] xen: arm: wait 1000ms for a CPU to come up, instead of forever Ian Campbell
2015-01-14 14:27 ` Julien Grall [this message]
2015-01-14 14:39 ` Ian Campbell
2015-01-14 14:51 ` Julien Grall
2015-01-14 14:56 ` Ian Campbell
2015-01-14 15:11 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54B67CCA.9060205@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.