All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@linaro.org>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: linux-omap@vger.kernel.org, tony@atomide.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 7/9] ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Date: Wed, 27 Mar 2013 11:45:11 -0700	[thread overview]
Message-ID: <878v587kco.fsf@linaro.org> (raw)
In-Reply-To: <1361373527-21695-8-git-send-email-santosh.shilimkar@ti.com> (Santosh Shilimkar's message of "Wed, 20 Feb 2013 20:48:45 +0530")

Santosh Shilimkar <santosh.shilimkar@ti.com> writes:

> Move the secondary CPU wakeup prepare code under smp_prepare_cpus(). 

Why?

> While at
> it drop the un-necessary sev() and barrier which was under prepare code.
>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>  arch/arm/mach-omap2/omap-smp.c |   51 ++++++++++++++++------------------------
>  1 file changed, 20 insertions(+), 31 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
> index 7d29a74..9711ecd 100644
> --- a/arch/arm/mach-omap2/omap-smp.c
> +++ b/arch/arm/mach-omap2/omap-smp.c
> @@ -164,36 +164,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *
>  	return 0;
>  }
>  
> -static void __init wakeup_secondary(void)
> -{
> -	void *startup_addr = omap_secondary_startup;
> -	void __iomem *base = omap_get_wakeupgen_base();
> -
> -	if (cpu_is_omap446x()) {
> -		startup_addr = omap_secondary_startup_4460;
> -		pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
> -	}
> -
> -	/*
> -	 * Write the address of secondary startup routine into the
> -	 * AuxCoreBoot1 where ROM code will jump and start executing
> -	 * on secondary core once out of WFE
> -	 * A barrier is added to ensure that write buffer is drained
> -	 */
> -	if (omap_secure_apis_support())
> -		omap_auxcoreboot_addr(virt_to_phys(startup_addr));
> -	else
> -		__raw_writel(virt_to_phys(omap5_secondary_startup),
> -						base + OMAP_AUX_CORE_BOOT_1);
> -
> -	/*
> -	 * Send a 'sev' to wake the secondary core from WFE.
> -	 * Drain the outstanding writes to memory
> -	 */
> -	dsb_sev();
> -	mb();
> -}
> -
>  /*
>   * Initialise the CPU possible map early - this describes the CPUs
>   * which may be present or become present in the system.
> @@ -231,6 +201,8 @@ static void __init omap4_smp_init_cpus(void)
>  
>  static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
>  {
> +	void *startup_addr = omap_secondary_startup;
> +	void __iomem *base = omap_get_wakeupgen_base();
>  
>  	/*
>  	 * Initialise the SCU and wake up the secondary core using
> @@ -238,7 +210,24 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
>  	 */
>  	if (scu_base)
>  		scu_enable(scu_base);
> -	wakeup_secondary();
> +
> +	if (cpu_is_omap446x()) {
> +		startup_addr = omap_secondary_startup_4460;
> +		pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
> +	}
> +
> +	/*
> +	 * Write the address of secondary startup routine into the
> +	 * AuxCoreBoot1 where ROM code will jump and start executing
> +	 * on secondary core once out of WFE
> +	 * A barrier is added to ensure that write buffer is drained
> +	 */
> +	if (omap_secure_apis_support())
> +		omap_auxcoreboot_addr(virt_to_phys(startup_addr));
> +	else
> +		__raw_writel(virt_to_phys(omap5_secondary_startup),
> +						base + OMAP_AUX_CORE_BOOT_1);
> +
>  }
>  
>  struct smp_operations omap4_smp_ops __initdata = {

WARNING: multiple messages have this Message-ID (diff)
From: khilman@linaro.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/9] ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Date: Wed, 27 Mar 2013 11:45:11 -0700	[thread overview]
Message-ID: <878v587kco.fsf@linaro.org> (raw)
In-Reply-To: <1361373527-21695-8-git-send-email-santosh.shilimkar@ti.com> (Santosh Shilimkar's message of "Wed, 20 Feb 2013 20:48:45 +0530")

Santosh Shilimkar <santosh.shilimkar@ti.com> writes:

> Move the secondary CPU wakeup prepare code under smp_prepare_cpus(). 

Why?

> While at
> it drop the un-necessary sev() and barrier which was under prepare code.
>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>  arch/arm/mach-omap2/omap-smp.c |   51 ++++++++++++++++------------------------
>  1 file changed, 20 insertions(+), 31 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
> index 7d29a74..9711ecd 100644
> --- a/arch/arm/mach-omap2/omap-smp.c
> +++ b/arch/arm/mach-omap2/omap-smp.c
> @@ -164,36 +164,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *
>  	return 0;
>  }
>  
> -static void __init wakeup_secondary(void)
> -{
> -	void *startup_addr = omap_secondary_startup;
> -	void __iomem *base = omap_get_wakeupgen_base();
> -
> -	if (cpu_is_omap446x()) {
> -		startup_addr = omap_secondary_startup_4460;
> -		pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
> -	}
> -
> -	/*
> -	 * Write the address of secondary startup routine into the
> -	 * AuxCoreBoot1 where ROM code will jump and start executing
> -	 * on secondary core once out of WFE
> -	 * A barrier is added to ensure that write buffer is drained
> -	 */
> -	if (omap_secure_apis_support())
> -		omap_auxcoreboot_addr(virt_to_phys(startup_addr));
> -	else
> -		__raw_writel(virt_to_phys(omap5_secondary_startup),
> -						base + OMAP_AUX_CORE_BOOT_1);
> -
> -	/*
> -	 * Send a 'sev' to wake the secondary core from WFE.
> -	 * Drain the outstanding writes to memory
> -	 */
> -	dsb_sev();
> -	mb();
> -}
> -
>  /*
>   * Initialise the CPU possible map early - this describes the CPUs
>   * which may be present or become present in the system.
> @@ -231,6 +201,8 @@ static void __init omap4_smp_init_cpus(void)
>  
>  static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
>  {
> +	void *startup_addr = omap_secondary_startup;
> +	void __iomem *base = omap_get_wakeupgen_base();
>  
>  	/*
>  	 * Initialise the SCU and wake up the secondary core using
> @@ -238,7 +210,24 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
>  	 */
>  	if (scu_base)
>  		scu_enable(scu_base);
> -	wakeup_secondary();
> +
> +	if (cpu_is_omap446x()) {
> +		startup_addr = omap_secondary_startup_4460;
> +		pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
> +	}
> +
> +	/*
> +	 * Write the address of secondary startup routine into the
> +	 * AuxCoreBoot1 where ROM code will jump and start executing
> +	 * on secondary core once out of WFE
> +	 * A barrier is added to ensure that write buffer is drained
> +	 */
> +	if (omap_secure_apis_support())
> +		omap_auxcoreboot_addr(virt_to_phys(startup_addr));
> +	else
> +		__raw_writel(virt_to_phys(omap5_secondary_startup),
> +						base + OMAP_AUX_CORE_BOOT_1);
> +
>  }
>  
>  struct smp_operations omap4_smp_ops __initdata = {

  reply	other threads:[~2013-03-27 18:45 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20 15:18 [PATCH 0/9] ARM: OMAP: Static deps, fiq, omap-smp cleanup Santosh Shilimkar
2013-02-20 15:18 ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 1/9] ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:41   ` Kevin Hilman
2013-03-27 18:41     ` Kevin Hilman
2013-03-27 20:49     ` Santosh Shilimkar
2013-03-27 20:49       ` Santosh Shilimkar
2013-03-27 20:49       ` Tony Lindgren
2013-03-27 20:49         ` Tony Lindgren
2013-03-27 20:52         ` Santosh Shilimkar
2013-03-27 20:52           ` Santosh Shilimkar
2013-03-28  7:32           ` Santosh Shilimkar
2013-03-28  7:32             ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 2/9] ARM: OMAP1: PM: Remove bogus fiq_[enable/disable] tuple Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-02-20 16:09   ` Tony Lindgren
2013-02-20 16:09     ` Tony Lindgren
2013-02-20 16:14     ` Santosh Shilimkar
2013-02-20 16:14       ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 3/9] ARM: OMAP2+: " Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:36   ` Kevin Hilman
2013-03-27 18:36     ` Kevin Hilman
2013-03-27 19:02     ` Santosh Shilimkar
2013-03-27 19:02       ` Santosh Shilimkar
2013-03-28  7:37       ` Santosh Shilimkar
2013-03-28  7:37         ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 4/9] ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:43   ` Kevin Hilman
2013-03-27 18:43     ` Kevin Hilman
2013-03-27 20:47     ` Santosh Shilimkar
2013-03-27 20:47       ` Santosh Shilimkar
2013-03-28  7:29       ` Santosh Shilimkar
2013-03-28  7:29         ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 5/9] ARM: OMAP4+: Remove un-necessary cacheflush in secondary CPU boot path Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 6/9] ARM: OMAP4+: Remove out of placed smp_wmb() in secondary wakeup code Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-02-21 12:55   ` Sergei Shtylyov
2013-02-21 12:55     ` Sergei Shtylyov
2013-02-21 12:59     ` Santosh Shilimkar
2013-02-21 12:59       ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 7/9] ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus() Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:45   ` Kevin Hilman [this message]
2013-03-27 18:45     ` Kevin Hilman
2013-03-27 19:04     ` Santosh Shilimkar
2013-03-27 19:04       ` Santosh Shilimkar
2013-03-27 19:54       ` Kevin Hilman
2013-03-27 19:54         ` Kevin Hilman
2013-03-27 20:50         ` Santosh Shilimkar
2013-03-27 20:50           ` Santosh Shilimkar
2013-03-28  7:35           ` Santosh Shilimkar
2013-03-28  7:35             ` Santosh Shilimkar
2013-03-28  9:46       ` Russell King - ARM Linux
2013-03-28  9:46         ` Russell King - ARM Linux
2013-03-28  9:58         ` Santosh Shilimkar
2013-03-28  9:58           ` Santosh Shilimkar
2013-03-28 12:04           ` Russell King - ARM Linux
2013-03-28 12:04             ` Russell King - ARM Linux
2013-03-28 12:09             ` Santosh Shilimkar
2013-03-28 12:09               ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 8/9] ARM: OMAP4: PM: Remove L4 wakeup depedency with MPU since errata fix exist now Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:46   ` Kevin Hilman
2013-03-27 18:46     ` Kevin Hilman
2013-03-27 19:01     ` Peter Korsgaard
2013-03-27 19:01       ` Peter Korsgaard
2013-02-20 15:18 ` [PATCH 9/9] ARM: OMAP4: PM: Now remove L4 per clockdomain static depedency with MPU Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:46   ` Kevin Hilman
2013-03-27 18:46     ` Kevin Hilman

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=878v587kco.fsf@linaro.org \
    --to=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=tony@atomide.com \
    /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.