All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: naresh.bhat@linaro.org, xen-devel@lists.xenproject.org,
	stefano.stabellini@citrix.com, ian.campbell@citrix.com,
	tim@xen.org
Subject: Re: [PATCH] xen/arm: Init traps very early
Date: Wed, 28 May 2014 14:49:10 +0100	[thread overview]
Message-ID: <5385E956.1040104@citrix.com> (raw)
In-Reply-To: <1401283983-19843-1-git-send-email-julien.grall@linaro.org>

On 28/05/14 14:33, Julien Grall wrote:
> The function init_traps setups the handler taken when Xen hits a BUG_ON/ASSERT.
>
> If an error happen before init_traps is called, we loose the backtrace.
>
> As the function doesn't require any specific setup, we can call it just
> after Xen has jumped in C code.
>
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> ---
>  xen/arch/arm/setup.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index b9ce7a9..5bf8686 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -666,6 +666,7 @@ void __init start_xen(unsigned long boot_phys_offset,
>      struct domain *dom0;
>  
>      setup_cache();
> +    init_traps();

Having recently redone this in x86, it must be after
set_processor_id(0), set_current() for debug sanity, and after
percpu_init_areas() for future proofing.

~Andrew

>  
>      percpu_init_areas();
>      set_processor_id(0); /* needed early, for smp_processor_id() */
> @@ -709,8 +710,6 @@ void __init start_xen(unsigned long boot_phys_offset,
>      set_current((struct vcpu *)0xfffff000); /* debug sanity */
>      idle_vcpu[0] = current;
>  
> -    init_traps();
> -
>      setup_virt_paging();
>  
>      p2m_vmid_allocator_init();

  parent reply	other threads:[~2014-05-28 13:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 13:33 [PATCH] xen/arm: Init traps very early Julien Grall
2014-05-28 13:40 ` Naresh Bhat
2014-05-28 13:49 ` Andrew Cooper [this message]
2014-05-28 13:58   ` Julien Grall
2014-05-28 14:04     ` Andrew Cooper
2014-05-28 14:09       ` Julien Grall
2014-05-28 14:16         ` Andrew Cooper

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=5385E956.1040104@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=naresh.bhat@linaro.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.