public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] ARM: HYP/non-sec: Make variable gic_dist_addr as a local one
Date: Wed, 14 Jan 2015 15:09:53 -0800	[thread overview]
Message-ID: <54B6F741.6070603@freescale.com> (raw)
In-Reply-To: <1418792285-20517-1-git-send-email-Yuantian.Tang@freescale.com>

Albert,

On 12/16/2014 08:58 PM, Tang Yuantian wrote:
> Defining variable gic_dist_addr as a globe one prevents some
> functions, which use it, from being used before relocation
> which is the case in the deep sleep resume process on Freescale
> SoC platforms.
> Besides, we can always get the GIC base address by calling
> get_gicd_base_address() without referring gic_dist_addr.
> 
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> ---
> v2:
> 	- change variable gic_dist_addr back as local
> 
>  arch/arm/cpu/armv7/virt-v7.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c
> index 651ca40..b69fd37 100644
> --- a/arch/arm/cpu/armv7/virt-v7.c
> +++ b/arch/arm/cpu/armv7/virt-v7.c
> @@ -15,8 +15,6 @@
>  #include <asm/io.h>
>  #include <asm/secure.h>
>  
> -unsigned long gic_dist_addr;
> -
>  static unsigned int read_id_pfr1(void)
>  {
>  	unsigned int reg;
> @@ -68,6 +66,12 @@ static void kick_secondary_cpus_gic(unsigned long gicdaddr)
>  
>  void __weak smp_kick_all_cpus(void)
>  {
> +	unsigned long gic_dist_addr;
> +
> +	gic_dist_addr = get_gicd_base_address();
> +	if (gic_dist_addr == -1)
> +		return;
> +
>  	kick_secondary_cpus_gic(gic_dist_addr);
>  }
>  
> @@ -75,6 +79,7 @@ int armv7_init_nonsec(void)
>  {
>  	unsigned int reg;
>  	unsigned itlinesnr, i;
> +	unsigned long gic_dist_addr;
>  
>  	/* check whether the CPU supports the security extensions */
>  	reg = read_id_pfr1();
> 

I think this patch is OK. If you don't have objection, I will bring it in.

York

  parent reply	other threads:[~2015-01-14 23:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17  4:58 [U-Boot] [PATCH v2 1/2] ARM: HYP/non-sec: Make variable gic_dist_addr as a local one Tang Yuantian
2014-12-17  4:58 ` [U-Boot] [PATCH v2 2/2] fsl/ls1021qds: Add deep sleep support Tang Yuantian
2014-12-18  2:47   ` Yuantian Tang
2015-01-24 15:43   ` York Sun
2015-01-14 23:09 ` York Sun [this message]
2015-01-24 15:05 ` [U-Boot] [PATCH v2 1/2] ARM: HYP/non-sec: Make variable gic_dist_addr as a local one York Sun

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=54B6F741.6070603@freescale.com \
    --to=yorksun@freescale.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox