]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
arm64: Move cpu_die_early to smp.c
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 23 Feb 2016 10:31:41 +0000 (10:31 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 24 Feb 2016 17:17:45 +0000 (17:17 +0000)
This patch moves cpu_die_early to smp.c, where it fits better.
No functional changes, except for adding the necessary checks
for CONFIG_HOTPLUG_CPU.

Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/smp.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/smp.c

index b93eb3303131582a0d93f1c0b73712e8d036c9be..51913be35a0a21814dac2d08d350a329aa233eb3 100644 (file)
@@ -77,6 +77,7 @@ extern int __cpu_disable(void);
 
 extern void __cpu_die(unsigned int cpu);
 extern void cpu_die(void);
+extern void cpu_die_early(void);
 
 static inline void cpu_park_loop(void)
 {
index 47e20211ff0b48e5d4472a626469a489ab6bd6cc..3926259e8530d6827221081a6597fad42fa61513 100644 (file)
@@ -874,25 +874,6 @@ static u64 __raw_read_system_reg(u32 sys_id)
        }
 }
 
-/*
- * Kill the calling secondary CPU, early in bringup before it is turned
- * online.
- */
-void cpu_die_early(void)
-{
-       int cpu = smp_processor_id();
-
-       pr_crit("CPU%d: will not boot\n", cpu);
-
-       /* Mark this CPU absent */
-       set_cpu_present(cpu, 0);
-
-       /* Check if we can park ourselves */
-       if (cpu_ops[cpu] && cpu_ops[cpu]->cpu_die)
-               cpu_ops[cpu]->cpu_die(cpu);
-       cpu_park_loop();
-}
-
 /*
  * Run through the enabled system capabilities and enable() it on this CPU.
  * The capabilities were decided based on the available CPUs at the boot time.
index 24cb4f800033bc2b9d5ad49144f915ca4506e6dc..8d09f597024da28bca5b47d618876f34f52b4508 100644 (file)
@@ -312,6 +312,28 @@ void cpu_die(void)
 }
 #endif
 
+/*
+ * Kill the calling secondary CPU, early in bringup before it is turned
+ * online.
+ */
+void cpu_die_early(void)
+{
+       int cpu = smp_processor_id();
+
+       pr_crit("CPU%d: will not boot\n", cpu);
+
+       /* Mark this CPU absent */
+       set_cpu_present(cpu, 0);
+
+#ifdef CONFIG_HOTPLUG_CPU
+       /* Check if we can park ourselves */
+       if (cpu_ops[cpu] && cpu_ops[cpu]->cpu_die)
+               cpu_ops[cpu]->cpu_die(cpu);
+#endif
+
+       cpu_park_loop();
+}
+
 static void __init hyp_mode_check(void)
 {
        if (is_hyp_mode_available())