All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Julien Grall <julien.grall@linaro.org>
Cc: Julien Grall <julien.grall@arm.com>,
	sstabellini@kernel.org, andre.przywara@linaro.org,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] xen/arm: gic-v3: Bail out if gicv3_cpu_init fail
Date: Thu, 7 Dec 2017 15:05:08 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1712071503020.3236@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <20171206145137.15602-1-julien.grall@linaro.org>

On Wed, 6 Dec 2017, Julien Grall wrote:
> From: Julien Grall <julien.grall@arm.com>
> 
> When system registers are not enabled, all the access to them will trap
                                             ^ accesses


> in EL2. In Xen, system registers will be enabled by gicv3_cpu_init only
> on success. As the rest of the code (e.g gicv3_hyp_init) relies on
> system register, it is better to bail out directly.
> 
> This will save time on debugging early boot issue on GICv3 platform.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>

This is good:

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


Do we also want to print a warning or an error message?



> ---
> 
> This makes easier to debug early boot issue on GICv3 platform. It would
> be worth considering to backport it.
> ---
>  xen/arch/arm/gic-v3.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
> index 473e26111f..a0d290b55c 100644
> --- a/xen/arch/arm/gic-v3.c
> +++ b/xen/arch/arm/gic-v3.c
> @@ -847,8 +847,12 @@ static int gicv3_secondary_cpu_init(void)
>      spin_lock(&gicv3.lock);
>  
>      res = gicv3_cpu_init();
> +    if ( res )
> +        goto out;
> +
>      gicv3_hyp_init();
>  
> +out:
>      spin_unlock(&gicv3.lock);
>  
>      return res;
> @@ -1705,8 +1709,12 @@ static int __init gicv3_init(void)
>          panic("GICv3: ITS: initialization failed: %d\n", res);
>  
>      res = gicv3_cpu_init();
> +    if ( res )
> +        goto out;
> +
>      gicv3_hyp_init();
>  
> +out:
>      spin_unlock(&gicv3.lock);
>  
>      return res;
> -- 
> 2.11.0
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2017-12-07 23:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 14:51 [PATCH] xen/arm: gic-v3: Bail out if gicv3_cpu_init fail Julien Grall
2017-12-07 23:05 ` Stefano Stabellini [this message]
2017-12-08 15:21   ` Julien Grall
2017-12-08 21:17     ` Stefano Stabellini

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=alpine.DEB.2.10.1712071503020.3236@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=andre.przywara@linaro.org \
    --cc=julien.grall@arm.com \
    --cc=julien.grall@linaro.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.