static void __init msm_platform_smp_prepare_cpus(unsigned int max_cpus) { int cpu, map; unsigned int flags = 0; if (scm_is_mc_boot_available()) return msm_platform_smp_prepare_cpus_mc(max_cpus); for_each_present_cpu(cpu) { map = cpu_logical_map(cpu); if (map > ARRAY_SIZE(cold_boot_flags)) { set_cpu_present(cpu, false); __WARN(); continue; } flags |= cold_boot_flags[map]; } #ifdef CONFIG_HTC_DEBUG_FOOTPRINT init_cpu_debug_counter_for_cold_boot(); #endif if (scm_set_boot_addr(virt_to_phys(msm_secondary_startup), flags)) pr_warn("Failed to set CPU boot address\n"); }
static void __init msm_platform_smp_prepare_cpus(unsigned int max_cpus) { int cpu, map; unsigned int flags = 0; if (scm_is_mc_boot_available()) return msm_platform_smp_prepare_cpus_mc(max_cpus); for_each_present_cpu(cpu) { map = cpu_logical_map(cpu); if (map >= ARRAY_SIZE(cold_boot_flags)) { set_cpu_present(cpu, false); __WARN(); continue; } flags |= cold_boot_flags[map]; } if (scm_set_boot_addr(virt_to_phys(msm_secondary_startup), flags)) pr_warn("Failed to set CPU boot address\n"); /* Mark CPU0 cold boot flag as done */ per_cpu(cold_boot_done, 0) = true; }