Skip to contentSkip to conversation

ux500: add CPU hotplug support

PATCH Superseded Sundar Iyer 3 participants 3 messages Sep 13, 2010

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ux500: add CPU hotplug support

---
 arch/arm/mach-ux500/Makefile  |    1 +
 arch/arm/mach-ux500/hotplug.c |   75 +++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-ux500/platsmp.c |    4 ++-
 3 files changed, 79 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-ux500/hotplug.c
arch/arm/mach-ux500/Makefile +1 -0
index 0097318..bb3e74e 100644
@@ -8,4 +8,5 @@ obj-$(CONFIG_UX500_SOC_DB8500)	+= cpu-db8500.o devices-db8500.o prcmu.o
 obj-$(CONFIG_MACH_U8500_MOP)	+= board-mop500.o board-mop500-sdi.o
 obj-$(CONFIG_MACH_U5500)	+= board-u5500.o
 obj-$(CONFIG_SMP)		+= platsmp.o headsmp.o
+obj-$(CONFIG_HOTPLUG_CPU)	+= hotplug.o
 obj-$(CONFIG_LOCAL_TIMERS)	+= localtimer.o
arch/arm/mach-ux500/hotplug.c new file +75 -0

75 lines not on this page · raw message

arch/arm/mach-ux500/platsmp.c +3 -1
index 438ef16..ade2e17 100644
@@ -26,7 +26,7 @@
  * control for which core is the next to come out of the secondary
  * boot "holding pen"
  */
-volatile int __cpuinitdata pen_release = -1;
+volatile int pen_release = -1;
 
 static unsigned int __init get_core_count(void)
 {
@@ -78,6 +78,8 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
 	__cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release));
 	outer_clean_range(__pa(&pen_release), __pa(&pen_release) + 1);
 
+	smp_cross_call(cpumask_of(cpu));
+
 	timeout = jiffies + (1 * HZ);
 	while (time_before(jiffies, timeout)) {
 		if (pen_release == -1)
Signature · 1 line
1.7.2.dirty
#1 lore raw

PATCH 1/1 ux500: add CPU hotplug support

arch/arm/mach-ux500/platsmp.c line 29

Quoted 10 lines · Sundar Iyer
arch/arm/mach-ux500/platsmp.c +1 -1
index 438ef16..ade2e17 100644
@@ -26,7 +26,7 @@
  * control for which core is the next to come out of the secondary
  * boot "holding pen"
  */
-volatile int __cpuinitdata pen_release = -1;
+volatile int pen_release = -1;

This looks like an unnecessary change.

#2 lore raw

PATCH 1/1 ux500: add CPU hotplug support

Quoted 13 lines · Russell King - ARM Linux

arch/arm/mach-ux500/platsmp.c line 29

Quoted 10 lines · Sundar Iyer
arch/arm/mach-ux500/platsmp.c +1 -1
index 438ef16..ade2e17 100644
@@ -26,7 +26,7 @@
  * control for which core is the next to come out of the secondary
  * boot "holding pen"
  */
-volatile int __cpuinitdata pen_release = -1;
+volatile int pen_release = -1;

This looks like an unnecessary change.

I think it avoids a build warning about mismatched sections but that's probably the wrong way to fix. We get similar warnings on Versatile Express and RealView when hotplug is enabled but I haven't had the time to investigate properly.

Signature · 1 line
Catalin