All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/06] ARM: shmobile: Trivial SMP cleanups
@ 2013-02-12 15:44 ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

ARM: shmobile: Trivial SMP cleanups

[PATCH 01/06] ARM: shmobile: Remove unused headers from hotplug.c
[PATCH 02/06] ARM: shmobile: Remove partial CPU Hotplug from EMEV2
[PATCH 03/06] ARM: shmobile: Move EMEV2 CPU boot vector setup code
[PATCH 04/06] ARM: shmobile: Remove sh73a0_get_core_count()
[PATCH 05/06] ARM: shmobile: Remove r8a7779_get_core_count()
[PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count()

This series contains random trivial SMP cleanups for mach-shmobile.

The patches are known to build for sh73a0, r8a7779 and EMEV2,
and on top of that they also work well on the KZM9D/EMEV2 board.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 No known dependencies, simply written against -next in renesas.git.

 arch/arm/mach-shmobile/hotplug.c     |    4 --
 arch/arm/mach-shmobile/smp-emev2.c   |   55 ++++++----------------------------
 arch/arm/mach-shmobile/smp-r8a7779.c |    9 -----
 arch/arm/mach-shmobile/smp-sh73a0.c  |    9 -----
 4 files changed, 13 insertions(+), 64 deletions(-)



^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 00/06] ARM: shmobile: Trivial SMP cleanups
@ 2013-02-12 15:44 ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

ARM: shmobile: Trivial SMP cleanups

[PATCH 01/06] ARM: shmobile: Remove unused headers from hotplug.c
[PATCH 02/06] ARM: shmobile: Remove partial CPU Hotplug from EMEV2
[PATCH 03/06] ARM: shmobile: Move EMEV2 CPU boot vector setup code
[PATCH 04/06] ARM: shmobile: Remove sh73a0_get_core_count()
[PATCH 05/06] ARM: shmobile: Remove r8a7779_get_core_count()
[PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count()

This series contains random trivial SMP cleanups for mach-shmobile.

The patches are known to build for sh73a0, r8a7779 and EMEV2,
and on top of that they also work well on the KZM9D/EMEV2 board.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 No known dependencies, simply written against -next in renesas.git.

 arch/arm/mach-shmobile/hotplug.c     |    4 --
 arch/arm/mach-shmobile/smp-emev2.c   |   55 ++++++----------------------------
 arch/arm/mach-shmobile/smp-r8a7779.c |    9 -----
 arch/arm/mach-shmobile/smp-sh73a0.c  |    9 -----
 4 files changed, 13 insertions(+), 64 deletions(-)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 01/06] ARM: shmobile: Remove unused headers from hotplug.c
  2013-02-12 15:44 ` Magnus Damm
@ 2013-02-12 15:44   ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

This file has no SoC-specific references in it, and
fortunately it is still independent of OF so there
is no real reason to drag in these headers.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/hotplug.c |    4 ----
 1 file changed, 4 deletions(-)

--- 0001/arch/arm/mach-shmobile/hotplug.c
+++ work/arch/arm/mach-shmobile/hotplug.c	2013-02-12 23:44:08.000000000 +0900
@@ -14,12 +14,8 @@
 #include <linux/smp.h>
 #include <linux/cpumask.h>
 #include <linux/delay.h>
-#include <linux/of.h>
 #include <mach/common.h>
-#include <mach/r8a7779.h>
-#include <mach/emev2.h>
 #include <asm/cacheflush.h>
-#include <asm/mach-types.h>
 
 static cpumask_t dead_cpus;
 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 01/06] ARM: shmobile: Remove unused headers from hotplug.c
@ 2013-02-12 15:44   ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

This file has no SoC-specific references in it, and
fortunately it is still independent of OF so there
is no real reason to drag in these headers.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/hotplug.c |    4 ----
 1 file changed, 4 deletions(-)

--- 0001/arch/arm/mach-shmobile/hotplug.c
+++ work/arch/arm/mach-shmobile/hotplug.c	2013-02-12 23:44:08.000000000 +0900
@@ -14,12 +14,8 @@
 #include <linux/smp.h>
 #include <linux/cpumask.h>
 #include <linux/delay.h>
-#include <linux/of.h>
 #include <mach/common.h>
-#include <mach/r8a7779.h>
-#include <mach/emev2.h>
 #include <asm/cacheflush.h>
-#include <asm/mach-types.h>
 
 static cpumask_t dead_cpus;
 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 02/06] ARM: shmobile: Remove partial CPU Hotplug from EMEV2
  2013-02-12 15:44 ` Magnus Damm
@ 2013-02-12 15:44   ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Remove partial CPU hotplug support from EMEV2 SMP code.

The upstream EMEV2 SMP support code has no CPU shutdown or
reset ability so we cannot reboot the secondary CPU cores.

Regular SMP operation is however still working as expected.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Tested on KZM9D hardware.

 arch/arm/mach-shmobile/smp-emev2.c |   28 ----------------------------
 1 file changed, 28 deletions(-)

--- 0001/arch/arm/mach-shmobile/smp-emev2.c
+++ work/arch/arm/mach-shmobile/smp-emev2.c	2013-02-12 22:44:23.000000000 +0900
@@ -62,29 +62,6 @@ static unsigned int __init emev2_get_cor
 	return scu_base ? scu_get_core_count(scu_base) : 1;
 }
 
-static int emev2_platform_cpu_kill(unsigned int cpu)
-{
-	return 0; /* not supported yet */
-}
-
-static int __maybe_unused emev2_cpu_kill(unsigned int cpu)
-{
-	int k;
-
-	/* this function is running on another CPU than the offline target,
-	 * here we need wait for shutdown code in platform_cpu_die() to
-	 * finish before asking SoC-specific code to power off the CPU core.
-	 */
-	for (k = 0; k < 1000; k++) {
-		if (shmobile_cpu_is_dead(cpu))
-			return emev2_platform_cpu_kill(cpu);
-		mdelay(1);
-	}
-
-	return 0;
-}
-
-
 static void __cpuinit emev2_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
@@ -126,9 +103,4 @@ struct smp_operations emev2_smp_ops __in
 	.smp_prepare_cpus	= emev2_smp_prepare_cpus,
 	.smp_secondary_init	= emev2_secondary_init,
 	.smp_boot_secondary	= emev2_boot_secondary,
-#ifdef CONFIG_HOTPLUG_CPU
-	.cpu_kill		= emev2_cpu_kill,
-	.cpu_die		= shmobile_cpu_die,
-	.cpu_disable		= shmobile_cpu_disable,
-#endif
 };

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 02/06] ARM: shmobile: Remove partial CPU Hotplug from EMEV2
@ 2013-02-12 15:44   ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Remove partial CPU hotplug support from EMEV2 SMP code.

The upstream EMEV2 SMP support code has no CPU shutdown or
reset ability so we cannot reboot the secondary CPU cores.

Regular SMP operation is however still working as expected.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Tested on KZM9D hardware.

 arch/arm/mach-shmobile/smp-emev2.c |   28 ----------------------------
 1 file changed, 28 deletions(-)

--- 0001/arch/arm/mach-shmobile/smp-emev2.c
+++ work/arch/arm/mach-shmobile/smp-emev2.c	2013-02-12 22:44:23.000000000 +0900
@@ -62,29 +62,6 @@ static unsigned int __init emev2_get_cor
 	return scu_base ? scu_get_core_count(scu_base) : 1;
 }
 
-static int emev2_platform_cpu_kill(unsigned int cpu)
-{
-	return 0; /* not supported yet */
-}
-
-static int __maybe_unused emev2_cpu_kill(unsigned int cpu)
-{
-	int k;
-
-	/* this function is running on another CPU than the offline target,
-	 * here we need wait for shutdown code in platform_cpu_die() to
-	 * finish before asking SoC-specific code to power off the CPU core.
-	 */
-	for (k = 0; k < 1000; k++) {
-		if (shmobile_cpu_is_dead(cpu))
-			return emev2_platform_cpu_kill(cpu);
-		mdelay(1);
-	}
-
-	return 0;
-}
-
-
 static void __cpuinit emev2_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
@@ -126,9 +103,4 @@ struct smp_operations emev2_smp_ops __in
 	.smp_prepare_cpus	= emev2_smp_prepare_cpus,
 	.smp_secondary_init	= emev2_secondary_init,
 	.smp_boot_secondary	= emev2_boot_secondary,
-#ifdef CONFIG_HOTPLUG_CPU
-	.cpu_kill		= emev2_cpu_kill,
-	.cpu_die		= shmobile_cpu_die,
-	.cpu_disable		= shmobile_cpu_disable,
-#endif
 };

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 03/06] ARM: shmobile: Move EMEV2 CPU boot vector setup code
  2013-02-12 15:44 ` Magnus Damm
@ 2013-02-12 15:45   ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Move the boot vector setup code for the EMEV2 SoC to match
the sh73a0 and r8a7779 implementations. With this in place
all SoC specific SMP implementations for mach-shmobile uses
the ->smp_prepare_cpus() callback to setup the boot vector.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Tested on KZM9D hardware.

 arch/arm/mach-shmobile/smp-emev2.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- 0006/arch/arm/mach-shmobile/smp-emev2.c
+++ work/arch/arm/mach-shmobile/smp-emev2.c	2013-02-12 23:57:31.000000000 +0900
@@ -74,9 +74,6 @@ static int __cpuinit emev2_boot_secondar
 	/* enable cache coherency */
 	modify_scu_cpu_psr(0, 3 << (cpu * 8));
 
-	/* Tell ROM loader about our vector (in headsmp.S) */
-	emev2_set_boot_vector(__pa(shmobile_secondary_vector));
-
 	arch_send_wakeup_ipi_mask(cpumask_of(cpu));
 	return 0;
 }
@@ -87,6 +84,9 @@ static void __init emev2_smp_prepare_cpu
 
 	scu_enable(scu_base);
 
+	/* Tell ROM loader about our vector (in headsmp.S) */
+	emev2_set_boot_vector(__pa(shmobile_secondary_vector));
+
 	/* enable cache coherency on CPU0 */
 	modify_scu_cpu_psr(0, 3 << (cpu * 8));
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 03/06] ARM: shmobile: Move EMEV2 CPU boot vector setup code
@ 2013-02-12 15:45   ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Move the boot vector setup code for the EMEV2 SoC to match
the sh73a0 and r8a7779 implementations. With this in place
all SoC specific SMP implementations for mach-shmobile uses
the ->smp_prepare_cpus() callback to setup the boot vector.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Tested on KZM9D hardware.

 arch/arm/mach-shmobile/smp-emev2.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- 0006/arch/arm/mach-shmobile/smp-emev2.c
+++ work/arch/arm/mach-shmobile/smp-emev2.c	2013-02-12 23:57:31.000000000 +0900
@@ -74,9 +74,6 @@ static int __cpuinit emev2_boot_secondar
 	/* enable cache coherency */
 	modify_scu_cpu_psr(0, 3 << (cpu * 8));
 
-	/* Tell ROM loader about our vector (in headsmp.S) */
-	emev2_set_boot_vector(__pa(shmobile_secondary_vector));
-
 	arch_send_wakeup_ipi_mask(cpumask_of(cpu));
 	return 0;
 }
@@ -87,6 +84,9 @@ static void __init emev2_smp_prepare_cpu
 
 	scu_enable(scu_base);
 
+	/* Tell ROM loader about our vector (in headsmp.S) */
+	emev2_set_boot_vector(__pa(shmobile_secondary_vector));
+
 	/* enable cache coherency on CPU0 */
 	modify_scu_cpu_psr(0, 3 << (cpu * 8));
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 04/06] ARM: shmobile: Remove sh73a0_get_core_count()
  2013-02-12 15:44 ` Magnus Damm
@ 2013-02-12 15:45   ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Reduce the number of lines of code in smp-sh73a0.c
by getting rid of the sh73a0_get_core_count() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/smp-sh73a0.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

--- 0001/arch/arm/mach-shmobile/smp-sh73a0.c
+++ work/arch/arm/mach-shmobile/smp-sh73a0.c	2013-02-12 23:50:18.000000000 +0900
@@ -52,13 +52,6 @@ void __init sh73a0_register_twd(void)
 }
 #endif
 
-static unsigned int __init sh73a0_get_core_count(void)
-{
-	void __iomem *scu_base = scu_base_addr();
-
-	return scu_get_core_count(scu_base);
-}
-
 static void __cpuinit sh73a0_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
@@ -90,7 +83,7 @@ static void __init sh73a0_smp_prepare_cp
 
 static void __init sh73a0_smp_init_cpus(void)
 {
-	unsigned int ncores = sh73a0_get_core_count();
+	unsigned int ncores = scu_get_core_count(scu_base_addr());
 
 	shmobile_smp_init_cpus(ncores);
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 04/06] ARM: shmobile: Remove sh73a0_get_core_count()
@ 2013-02-12 15:45   ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Reduce the number of lines of code in smp-sh73a0.c
by getting rid of the sh73a0_get_core_count() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/smp-sh73a0.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

--- 0001/arch/arm/mach-shmobile/smp-sh73a0.c
+++ work/arch/arm/mach-shmobile/smp-sh73a0.c	2013-02-12 23:50:18.000000000 +0900
@@ -52,13 +52,6 @@ void __init sh73a0_register_twd(void)
 }
 #endif
 
-static unsigned int __init sh73a0_get_core_count(void)
-{
-	void __iomem *scu_base = scu_base_addr();
-
-	return scu_get_core_count(scu_base);
-}
-
 static void __cpuinit sh73a0_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
@@ -90,7 +83,7 @@ static void __init sh73a0_smp_prepare_cp
 
 static void __init sh73a0_smp_init_cpus(void)
 {
-	unsigned int ncores = sh73a0_get_core_count();
+	unsigned int ncores = scu_get_core_count(scu_base_addr());
 
 	shmobile_smp_init_cpus(ncores);
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 05/06] ARM: shmobile: Remove r8a7779_get_core_count()
  2013-02-12 15:44 ` Magnus Damm
@ 2013-02-12 15:45   ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Reduce the number of lines of code in smp-r8a7779.c
by getting rid of the r8a7779_get_core_count() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/smp-r8a7779.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

--- 0001/arch/arm/mach-shmobile/smp-r8a7779.c
+++ work/arch/arm/mach-shmobile/smp-r8a7779.c	2013-02-12 23:51:15.000000000 +0900
@@ -87,13 +87,6 @@ static void modify_scu_cpu_psr(unsigned
 	__raw_writel(tmp, scu_base + 8);
 }
 
-static unsigned int __init r8a7779_get_core_count(void)
-{
-	void __iomem *scu_base = scu_base_addr();
-
-	return scu_get_core_count(scu_base);
-}
-
 static int r8a7779_platform_cpu_kill(unsigned int cpu)
 {
 	struct r8a7779_pm_ch *ch = NULL;
@@ -178,7 +171,7 @@ static void __init r8a7779_smp_prepare_c
 
 static void __init r8a7779_smp_init_cpus(void)
 {
-	unsigned int ncores = r8a7779_get_core_count();
+	unsigned int ncores = scu_get_core_count(scu_base_addr());
 
 	shmobile_smp_init_cpus(ncores);
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 05/06] ARM: shmobile: Remove r8a7779_get_core_count()
@ 2013-02-12 15:45   ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Reduce the number of lines of code in smp-r8a7779.c
by getting rid of the r8a7779_get_core_count() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/smp-r8a7779.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

--- 0001/arch/arm/mach-shmobile/smp-r8a7779.c
+++ work/arch/arm/mach-shmobile/smp-r8a7779.c	2013-02-12 23:51:15.000000000 +0900
@@ -87,13 +87,6 @@ static void modify_scu_cpu_psr(unsigned
 	__raw_writel(tmp, scu_base + 8);
 }
 
-static unsigned int __init r8a7779_get_core_count(void)
-{
-	void __iomem *scu_base = scu_base_addr();
-
-	return scu_get_core_count(scu_base);
-}
-
 static int r8a7779_platform_cpu_kill(unsigned int cpu)
 {
 	struct r8a7779_pm_ch *ch = NULL;
@@ -178,7 +171,7 @@ static void __init r8a7779_smp_prepare_c
 
 static void __init r8a7779_smp_init_cpus(void)
 {
-	unsigned int ncores = r8a7779_get_core_count();
+	unsigned int ncores = scu_get_core_count(scu_base_addr());
 
 	shmobile_smp_init_cpus(ncores);
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count()
  2013-02-12 15:44 ` Magnus Damm
@ 2013-02-12 15:45   ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Reduce the number of lines of code in smp-emev2.c
by getting rid of the emev2_get_core_count() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/smp-emev2.c |   21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

--- 0007/arch/arm/mach-shmobile/smp-emev2.c
+++ work/arch/arm/mach-shmobile/smp-emev2.c	2013-02-12 23:51:54.000000000 +0900
@@ -50,18 +50,6 @@ static void modify_scu_cpu_psr(unsigned
 
 }
 
-static unsigned int __init emev2_get_core_count(void)
-{
-	if (!scu_base) {
-		scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
-		emev2_clock_init(); /* need ioremapped SMU */
-	}
-
-	WARN_ON_ONCE(!scu_base);
-
-	return scu_base ? scu_get_core_count(scu_base) : 1;
-}
-
 static void __cpuinit emev2_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
@@ -93,7 +81,14 @@ static void __init emev2_smp_prepare_cpu
 
 static void __init emev2_smp_init_cpus(void)
 {
-	unsigned int ncores = emev2_get_core_count();
+	unsigned int ncores;
+
+	if (!scu_base) {
+		scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
+		emev2_clock_init(); /* need ioremapped SMU */
+	}
+
+	ncores = scu_base ? scu_get_core_count(scu_base) : 1;
 
 	shmobile_smp_init_cpus(ncores);
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count()
@ 2013-02-12 15:45   ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-12 15:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Reduce the number of lines of code in smp-emev2.c
by getting rid of the emev2_get_core_count() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/smp-emev2.c |   21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

--- 0007/arch/arm/mach-shmobile/smp-emev2.c
+++ work/arch/arm/mach-shmobile/smp-emev2.c	2013-02-12 23:51:54.000000000 +0900
@@ -50,18 +50,6 @@ static void modify_scu_cpu_psr(unsigned
 
 }
 
-static unsigned int __init emev2_get_core_count(void)
-{
-	if (!scu_base) {
-		scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
-		emev2_clock_init(); /* need ioremapped SMU */
-	}
-
-	WARN_ON_ONCE(!scu_base);
-
-	return scu_base ? scu_get_core_count(scu_base) : 1;
-}
-
 static void __cpuinit emev2_secondary_init(unsigned int cpu)
 {
 	gic_secondary_init(0);
@@ -93,7 +81,14 @@ static void __init emev2_smp_prepare_cpu
 
 static void __init emev2_smp_init_cpus(void)
 {
-	unsigned int ncores = emev2_get_core_count();
+	unsigned int ncores;
+
+	if (!scu_base) {
+		scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
+		emev2_clock_init(); /* need ioremapped SMU */
+	}
+
+	ncores = scu_base ? scu_get_core_count(scu_base) : 1;
 
 	shmobile_smp_init_cpus(ncores);
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 00/06] ARM: shmobile: Trivial SMP cleanups
  2013-02-12 15:44 ` Magnus Damm
@ 2013-02-12 22:16   ` Simon Horman
  -1 siblings, 0 replies; 18+ messages in thread
From: Simon Horman @ 2013-02-12 22:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 13, 2013 at 12:44:38AM +0900, Magnus Damm wrote:
> ARM: shmobile: Trivial SMP cleanups
> 
> [PATCH 01/06] ARM: shmobile: Remove unused headers from hotplug.c
> [PATCH 02/06] ARM: shmobile: Remove partial CPU Hotplug from EMEV2
> [PATCH 03/06] ARM: shmobile: Move EMEV2 CPU boot vector setup code
> [PATCH 04/06] ARM: shmobile: Remove sh73a0_get_core_count()
> [PATCH 05/06] ARM: shmobile: Remove r8a7779_get_core_count()
> [PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count()
> 
> This series contains random trivial SMP cleanups for mach-shmobile.
> 
> The patches are known to build for sh73a0, r8a7779 and EMEV2,
> and on top of that they also work well on the KZM9D/EMEV2 board.

Thanks, I have applied these to a new soc5 branch,
based on the soc4 branch which has been merged into arm-soc.

I have also updated next and topic/all+next with these changes.

I anticipate these changes will appear upstream in 3.10.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 00/06] ARM: shmobile: Trivial SMP cleanups
@ 2013-02-12 22:16   ` Simon Horman
  0 siblings, 0 replies; 18+ messages in thread
From: Simon Horman @ 2013-02-12 22:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 13, 2013 at 12:44:38AM +0900, Magnus Damm wrote:
> ARM: shmobile: Trivial SMP cleanups
> 
> [PATCH 01/06] ARM: shmobile: Remove unused headers from hotplug.c
> [PATCH 02/06] ARM: shmobile: Remove partial CPU Hotplug from EMEV2
> [PATCH 03/06] ARM: shmobile: Move EMEV2 CPU boot vector setup code
> [PATCH 04/06] ARM: shmobile: Remove sh73a0_get_core_count()
> [PATCH 05/06] ARM: shmobile: Remove r8a7779_get_core_count()
> [PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count()
> 
> This series contains random trivial SMP cleanups for mach-shmobile.
> 
> The patches are known to build for sh73a0, r8a7779 and EMEV2,
> and on top of that they also work well on the KZM9D/EMEV2 board.

Thanks, I have applied these to a new soc5 branch,
based on the soc4 branch which has been merged into arm-soc.

I have also updated next and topic/all+next with these changes.

I anticipate these changes will appear upstream in 3.10.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 00/06] ARM: shmobile: Trivial SMP cleanups
  2013-02-12 22:16   ` Simon Horman
@ 2013-02-13  0:47     ` Magnus Damm
  -1 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-13  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Wed, Feb 13, 2013 at 7:16 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Feb 13, 2013 at 12:44:38AM +0900, Magnus Damm wrote:
>> ARM: shmobile: Trivial SMP cleanups
>>
>> [PATCH 01/06] ARM: shmobile: Remove unused headers from hotplug.c
>> [PATCH 02/06] ARM: shmobile: Remove partial CPU Hotplug from EMEV2
>> [PATCH 03/06] ARM: shmobile: Move EMEV2 CPU boot vector setup code
>> [PATCH 04/06] ARM: shmobile: Remove sh73a0_get_core_count()
>> [PATCH 05/06] ARM: shmobile: Remove r8a7779_get_core_count()
>> [PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count()
>>
>> This series contains random trivial SMP cleanups for mach-shmobile.
>>
>> The patches are known to build for sh73a0, r8a7779 and EMEV2,
>> and on top of that they also work well on the KZM9D/EMEV2 board.
>
> Thanks, I have applied these to a new soc5 branch,
> based on the soc4 branch which has been merged into arm-soc.
>
> I have also updated next and topic/all+next with these changes.
>
> I anticipate these changes will appear upstream in 3.10.

Thanks, that is of course fine with me. I will prepare my second batch
of SMP updates then.

Cheers,

/ magnus

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 00/06] ARM: shmobile: Trivial SMP cleanups
@ 2013-02-13  0:47     ` Magnus Damm
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2013-02-13  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Wed, Feb 13, 2013 at 7:16 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Feb 13, 2013 at 12:44:38AM +0900, Magnus Damm wrote:
>> ARM: shmobile: Trivial SMP cleanups
>>
>> [PATCH 01/06] ARM: shmobile: Remove unused headers from hotplug.c
>> [PATCH 02/06] ARM: shmobile: Remove partial CPU Hotplug from EMEV2
>> [PATCH 03/06] ARM: shmobile: Move EMEV2 CPU boot vector setup code
>> [PATCH 04/06] ARM: shmobile: Remove sh73a0_get_core_count()
>> [PATCH 05/06] ARM: shmobile: Remove r8a7779_get_core_count()
>> [PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count()
>>
>> This series contains random trivial SMP cleanups for mach-shmobile.
>>
>> The patches are known to build for sh73a0, r8a7779 and EMEV2,
>> and on top of that they also work well on the KZM9D/EMEV2 board.
>
> Thanks, I have applied these to a new soc5 branch,
> based on the soc4 branch which has been merged into arm-soc.
>
> I have also updated next and topic/all+next with these changes.
>
> I anticipate these changes will appear upstream in 3.10.

Thanks, that is of course fine with me. I will prepare my second batch
of SMP updates then.

Cheers,

/ magnus

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-02-13  0:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-12 15:44 [PATCH 00/06] ARM: shmobile: Trivial SMP cleanups Magnus Damm
2013-02-12 15:44 ` Magnus Damm
2013-02-12 15:44 ` [PATCH 01/06] ARM: shmobile: Remove unused headers from hotplug.c Magnus Damm
2013-02-12 15:44   ` Magnus Damm
2013-02-12 15:44 ` [PATCH 02/06] ARM: shmobile: Remove partial CPU Hotplug from EMEV2 Magnus Damm
2013-02-12 15:44   ` Magnus Damm
2013-02-12 15:45 ` [PATCH 03/06] ARM: shmobile: Move EMEV2 CPU boot vector setup code Magnus Damm
2013-02-12 15:45   ` Magnus Damm
2013-02-12 15:45 ` [PATCH 04/06] ARM: shmobile: Remove sh73a0_get_core_count() Magnus Damm
2013-02-12 15:45   ` Magnus Damm
2013-02-12 15:45 ` [PATCH 05/06] ARM: shmobile: Remove r8a7779_get_core_count() Magnus Damm
2013-02-12 15:45   ` Magnus Damm
2013-02-12 15:45 ` [PATCH 06/06] ARM: shmobile: Remove emev2_get_core_count() Magnus Damm
2013-02-12 15:45   ` Magnus Damm
2013-02-12 22:16 ` [PATCH 00/06] ARM: shmobile: Trivial SMP cleanups Simon Horman
2013-02-12 22:16   ` Simon Horman
2013-02-13  0:47   ` Magnus Damm
2013-02-13  0:47     ` Magnus Damm

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.