Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: remove dead-code depending on CONFIG_UP_LATE_INIT

Commit 4b3dc9679cf7 ("arm64: force CONFIG_SMP=y and remove redundant
and therfore can not be selected anymore.

Remove dead #ifdef-block depending on UP_LATE_INIT in
arch/arm64/kernel/setup.c

Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
[will: kill do_post_cpus_up_work altogether]
Signed-off-by: Will Deacon <will.deacon@arm.com>

authored by

Jonas Rabenstein and committed by
Will Deacon
377bcff9 766ffb69

+14 -28
-2
arch/arm64/include/asm/smp_plat.h
··· 56 56 return -EINVAL; 57 57 } 58 58 59 - void __init do_post_cpus_up_work(void); 60 - 61 59 #endif /* __ASM_SMP_PLAT_H */
-25
arch/arm64/kernel/setup.c
··· 63 63 #include <asm/memblock.h> 64 64 #include <asm/psci.h> 65 65 #include <asm/efi.h> 66 - #include <asm/virt.h> 67 66 #include <asm/xen/hypervisor.h> 68 67 69 68 unsigned long elf_hwcap __read_mostly; ··· 195 196 pr_warn("Large number of MPIDR hash buckets detected\n"); 196 197 __flush_dcache_area(&mpidr_hash, sizeof(struct mpidr_hash)); 197 198 } 198 - 199 - static void __init hyp_mode_check(void) 200 - { 201 - if (is_hyp_mode_available()) 202 - pr_info("CPU: All CPU(s) started at EL2\n"); 203 - else if (is_hyp_mode_mismatched()) 204 - WARN_TAINT(1, TAINT_CPU_OUT_OF_SPEC, 205 - "CPU: CPUs started in inconsistent modes"); 206 - else 207 - pr_info("CPU: All CPU(s) started at EL1\n"); 208 - } 209 - 210 - void __init do_post_cpus_up_work(void) 211 - { 212 - hyp_mode_check(); 213 - apply_alternatives_all(); 214 - } 215 - 216 - #ifdef CONFIG_UP_LATE_INIT 217 - void __init up_late_init(void) 218 - { 219 - do_post_cpus_up_work(); 220 - } 221 - #endif /* CONFIG_UP_LATE_INIT */ 222 199 223 200 static void __init setup_processor(void) 224 201 {
+14 -1
arch/arm64/kernel/smp.c
··· 52 52 #include <asm/sections.h> 53 53 #include <asm/tlbflush.h> 54 54 #include <asm/ptrace.h> 55 + #include <asm/virt.h> 55 56 56 57 #define CREATE_TRACE_POINTS 57 58 #include <trace/events/ipi.h> ··· 311 310 } 312 311 #endif 313 312 313 + static void __init hyp_mode_check(void) 314 + { 315 + if (is_hyp_mode_available()) 316 + pr_info("CPU: All CPU(s) started at EL2\n"); 317 + else if (is_hyp_mode_mismatched()) 318 + WARN_TAINT(1, TAINT_CPU_OUT_OF_SPEC, 319 + "CPU: CPUs started in inconsistent modes"); 320 + else 321 + pr_info("CPU: All CPU(s) started at EL1\n"); 322 + } 323 + 314 324 void __init smp_cpus_done(unsigned int max_cpus) 315 325 { 316 326 pr_info("SMP: Total of %d processors activated.\n", num_online_cpus()); 317 - do_post_cpus_up_work(); 327 + hyp_mode_check(); 328 + apply_alternatives_all(); 318 329 } 319 330 320 331 void __init smp_prepare_boot_cpu(void)