Skip to contentSkip to conversation

ARM: highbank: convert logical CPU numbers to physical numbers

PATCH Superseded Will Deacon 2 participants 2 messages Nov 11, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: highbank: convert logical CPU numbers to physical numbers

This patch uses the new cpu_logical_map() macro for converting logical CPU numbers into physical numbers when releasing CPUs during the SMP boot and CPU hotplug paths.

---
 arch/arm/mach-highbank/highbank.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-highbank/highbank.c +4 -0
index b82dcf0..88660d5 100644
@@ -22,6 +22,7 @@
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/of_address.h>
+#include <linux/smp.h>
 
 #include <asm/cacheflush.h>
 #include <asm/unified.h>
@@ -72,6 +73,9 @@ static void __init highbank_map_io(void)
 
 void highbank_set_cpu_jump(int cpu, void *jump_addr)
 {
+#ifdef CONFIG_SMP
+	cpu = cpu_logical_map(cpu);
+#endif
 	writel(BSYM(virt_to_phys(jump_addr)), HB_JUMP_TABLE_VIRT(cpu));
 	__cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16);
 	outer_clean_range(HB_JUMP_TABLE_PHYS(cpu),
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v2 1/1 ARM: highbank: convert logical CPU numbers to physical numbers

Quoted 7 lines · Will Deacon

This patch uses the new cpu_logical_map() macro for converting logical CPU numbers into physical numbers when releasing CPUs during the SMP boot and CPU hotplug paths.

---

Thanks.

Quoted 25 lines
 arch/arm/mach-highbank/highbank.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-highbank/highbank.c +4 -0
index b82dcf0..88660d5 100644
@@ -22,6 +22,7 @@
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/of_address.h>
+#include <linux/smp.h>
 
 #include <asm/cacheflush.h>
 #include <asm/unified.h>
@@ -72,6 +73,9 @@ static void __init highbank_map_io(void)
 
 void highbank_set_cpu_jump(int cpu, void *jump_addr)
 {
+#ifdef CONFIG_SMP
+	cpu = cpu_logical_map(cpu);
+#endif
 	writel(BSYM(virt_to_phys(jump_addr)), HB_JUMP_TABLE_VIRT(cpu));
 	__cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16);
 	outer_clean_range(HB_JUMP_TABLE_PHYS(cpu),