All of lore.kernel.org
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 10/12] ARM: SoC: convert highbank to SoC descriptor
Date: Thu, 07 Jun 2012 19:52:09 -0500	[thread overview]
Message-ID: <4FD14CB9.5040109@gmail.com> (raw)
In-Reply-To: <1339085369-26073-11-git-send-email-marc.zyngier@arm.com>

On 06/07/2012 11:09 AM, Marc Zyngier wrote:
> Convert the highbank platform to use the SoC descriptor to provide
> its SMP and CPU hotplug operations.
> 
> Cc: Rob Herring <rob.herring@calxeda.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---

Acked-by: Rob Herring <rob.herring@calxeda.com>

>  arch/arm/mach-highbank/core.h     |    8 ++++++++
>  arch/arm/mach-highbank/highbank.c |    7 +++++++
>  arch/arm/mach-highbank/hotplug.c  |    6 +++---
>  arch/arm/mach-highbank/platsmp.c  |   19 +++++++++++++++----
>  4 files changed, 33 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
> index d8e2d0b..d1fd356 100644
> --- a/arch/arm/mach-highbank/core.h
> +++ b/arch/arm/mach-highbank/core.h
> @@ -1,3 +1,5 @@
> +#include <asm/soc.h>
> +
>  extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
>  extern void highbank_clocks_init(void);
>  extern void highbank_restart(char, const char *);
> @@ -8,3 +10,9 @@ extern void highbank_lluart_map_io(void);
>  static inline void highbank_lluart_map_io(void) {}
>  #endif
>  
> +extern int highbank_cpu_kill(unsigned int cpu);
> +extern void highbank_cpu_die(unsigned int cpu);
> +extern int highbank_cpu_disable(unsigned int cpu);
> +
> +extern struct arm_soc_smp_init_ops	highbank_soc_smp_init_ops;
> +extern struct arm_soc_smp_ops		highbank_soc_smp_ops;
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index 410a112..2dcfd8c 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -140,7 +140,14 @@ static const char *highbank_match[] __initconst = {
>  	NULL,
>  };
>  
> +static struct arm_soc_desc highbank_soc_desc __initdata = {
> +	.name	= "Calxeda Highbank",
> +	soc_smp_init_ops(highbank_soc_smp_init_ops)
> +	soc_smp_ops(highbank_soc_smp_ops)
> +};
> +
>  DT_MACHINE_START(HIGHBANK, "Highbank")
> +	.soc		= &highbank_soc_desc,
>  	.map_io		= highbank_map_io,
>  	.init_irq	= highbank_init_irq,
>  	.timer		= &highbank_timer,
> diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c
> index 977cebb..7c25d49 100644
> --- a/arch/arm/mach-highbank/hotplug.c
> +++ b/arch/arm/mach-highbank/hotplug.c
> @@ -24,7 +24,7 @@
>  
>  extern void secondary_startup(void);
>  
> -int platform_cpu_kill(unsigned int cpu)
> +int highbank_cpu_kill(unsigned int cpu)
>  {
>  	return 1;
>  }
> @@ -33,7 +33,7 @@ int platform_cpu_kill(unsigned int cpu)
>   * platform-specific code to shutdown a CPU
>   *
>   */
> -void platform_cpu_die(unsigned int cpu)
> +void highbank_cpu_die(unsigned int cpu)
>  {
>  	flush_cache_all();
>  
> @@ -46,7 +46,7 @@ void platform_cpu_die(unsigned int cpu)
>  	panic("highbank: cpu %d unexpectedly exit from shutdown\n", cpu);
>  }
>  
> -int platform_cpu_disable(unsigned int cpu)
> +int highbank_cpu_disable(unsigned int cpu)
>  {
>  	/*
>  	 * CPU0 should not be shut down via hotplug.  cpu_idle can WFI
> diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c
> index d01364c..b0e5cd3 100644
> --- a/arch/arm/mach-highbank/platsmp.c
> +++ b/arch/arm/mach-highbank/platsmp.c
> @@ -25,12 +25,12 @@
>  
>  extern void secondary_startup(void);
>  
> -void __cpuinit platform_secondary_init(unsigned int cpu)
> +static void __cpuinit highbank_secondary_init(unsigned int cpu)
>  {
>  	gic_secondary_init(0);
>  }
>  
> -int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
> +static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  {
>  	gic_raise_softirq(cpumask_of(cpu), 0);
>  	return 0;
> @@ -40,7 +40,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
>   * Initialise the CPU possible map early - this describes the CPUs
>   * which may be present or become present in the system.
>   */
> -void __init smp_init_cpus(void)
> +static void __init highbank_smp_init_cpus(void)
>  {
>  	unsigned int i, ncores;
>  
> @@ -61,7 +61,7 @@ void __init smp_init_cpus(void)
>  	set_smp_cross_call(gic_raise_softirq);
>  }
>  
> -void __init platform_smp_prepare_cpus(unsigned int max_cpus)
> +static void __init highbank_smp_prepare_cpus(unsigned int max_cpus)
>  {
>  	int i;
>  
> @@ -76,3 +76,14 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
>  	for (i = 1; i < max_cpus; i++)
>  		highbank_set_cpu_jump(i, secondary_startup);
>  }
> +
> +struct arm_soc_smp_init_ops highbank_soc_smp_init_ops __initdata = {
> +	.smp_init_cpus		= highbank_smp_init_cpus,
> +	.smp_prepare_cpus	= highbank_smp_prepare_cpus,
> +};
> +
> +struct arm_soc_smp_ops highbank_soc_smp_ops __initdata = {
> +	.smp_secondary_init	= highbank_secondary_init,
> +	.smp_boot_secondary	= highbank_boot_secondary,
> +	soc_hotplug_ops(highbank)
> +};

  reply	other threads:[~2012-06-08  0:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07 16:09 [PATCH v7 00/12] Per SoC descriptor Marc Zyngier
2012-06-07 16:09 ` [PATCH v7 01/12] ARM: SoC: Introduce per " Marc Zyngier
2012-06-07 16:09 ` [PATCH v7 02/12] ARM: SoC: Add per SoC SMP and CPU hotplug operations Marc Zyngier
2012-06-11  3:47   ` Shawn Guo
2012-06-07 16:09 ` [PATCH v7 03/12] ARM: SoC: convert VExpress/RealView to SoC descriptor Marc Zyngier
2012-06-08  9:31   ` Pawel Moll
2012-06-07 16:09 ` [PATCH v7 04/12] ARM: SoC: convert OMAP4 " Marc Zyngier
2012-06-12  7:04   ` Tony Lindgren
2012-06-07 16:09 ` [PATCH v7 05/12] ARM: SoC: convert Tegra " Marc Zyngier
2012-06-07 16:09 ` [PATCH v7 06/12] ARM: SoC: convert Exynos4 " Marc Zyngier
2012-06-07 16:09 ` [PATCH v7 07/12] ARM: SoC: convert MSM SMP " Marc Zyngier
2012-06-07 20:23   ` David Brown
2012-06-07 16:09 ` [PATCH v7 08/12] ARM: SoC: convert ux500 " Marc Zyngier
2012-06-07 16:09 ` [PATCH v7 09/12] ARM: SoC: convert shmobile SMP " Marc Zyngier
2012-06-07 16:09 ` [PATCH v7 10/12] ARM: SoC: convert highbank " Marc Zyngier
2012-06-08  0:52   ` Rob Herring [this message]
2012-06-07 16:09 ` [PATCH v7 11/12] ARM: SoC: convert imx6q " Marc Zyngier
2012-06-11  3:48   ` Shawn Guo
2012-06-07 16:09 ` [PATCH v7 12/12] ARM: smp: Make SoC descriptor mandatory for SMP platforms Marc Zyngier
2012-06-08 14:54 ` [PATCH v7 00/12] Per SoC descriptor Arnd Bergmann
2012-06-12 10:39   ` Marc Zyngier

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=4FD14CB9.5040109@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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.