From: Julien Grall <julien.grall@linaro.org>
To: Bamvor Jian Zhang <bjzhang@suse.com>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH RFC] fix sun6i crash on setup_pagetables
Date: Wed, 24 Jul 2013 19:33:17 +0100 [thread overview]
Message-ID: <51F01DED.4020703@linaro.org> (raw)
In-Reply-To: <1374668066-4413-1-git-send-email-bjzhang@suse.com>
On 07/24/2013 01:14 PM, Bamvor Jian Zhang wrote:
> this patch move set_processor_id in front of setup_pagetables
> in order to fix crash when calling this_cpu in that functions.
> the HPTIDR is unknown value according to ARM ARM 7AR(DDI0406C),
> B4-1598. we should use it before using it.
>
> but i do not know why other board like arndale board. should
> bootloader write this register?
On the Arndale, by default the value of HPTIDR is equal to 0. So it
works without any issue.
During the afternoon, I have noticed this error and send a similar
patch few minutes ago. I also moved percpu_init_areas earlier.
For the next patches, could you add the appropriate people? It will
avoid to loose your patch with the other mail of the mailing list :).
>
> Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
> ---
> xen/arch/arm/setup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index 2f9fdc8..3bf1b40 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -437,6 +437,7 @@ void __init start_xen(unsigned long boot_phys_offset,
> cpus = smp_get_max_cpus();
> cmdline_parse(device_tree_bootargs(device_tree_flattened));
>
> + set_processor_id(0); /* needed early, for this_cpu() */
> setup_pagetables(boot_phys_offset, get_xen_paddr());
> setup_mm(fdt_paddr, fdt_size);
>
> @@ -459,7 +460,6 @@ void __init start_xen(unsigned long boot_phys_offset,
> make_cpus_ready(cpus, boot_phys_offset);
>
> percpu_init_areas();
I think you can also move percpu_init_areas earlier.
> - set_processor_id(0); /* needed early, for smp_processor_id() */
> set_current((struct vcpu *)0xfffff000); /* debug sanity */
> idle_vcpu[0] = current;
>
>
next prev parent reply other threads:[~2013-07-24 18:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 12:14 [PATCH RFC] fix sun6i crash on setup_pagetables Bamvor Jian Zhang
2013-07-24 18:33 ` Julien Grall [this message]
2013-07-25 3:29 ` Ian Campbell
2013-07-25 4:34 ` Bamvor Jian Zhang
2013-07-25 14:23 ` 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=51F01DED.4020703@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=bjzhang@suse.com \
--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.