--- zzzz-none-000/linux-3.10.107/arch/arm/mach-shmobile/platsmp.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/arm/mach-shmobile/platsmp.c 2021-02-04 17:41:59.000000000 +0000 @@ -11,18 +11,28 @@ * published by the Free Software Foundation. */ #include -#include +#include +#include +#include "common.h" -void __init shmobile_smp_init_cpus(unsigned int ncores) +extern unsigned long shmobile_smp_fn[]; +extern unsigned long shmobile_smp_arg[]; +extern unsigned long shmobile_smp_mpidr[]; + +void shmobile_smp_hook(unsigned int cpu, unsigned long fn, unsigned long arg) { - unsigned int i; + shmobile_smp_fn[cpu] = 0; + flush_cache_all(); - if (ncores > nr_cpu_ids) { - pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", - ncores, nr_cpu_ids); - ncores = nr_cpu_ids; - } + shmobile_smp_mpidr[cpu] = cpu_logical_map(cpu); + shmobile_smp_fn[cpu] = fn; + shmobile_smp_arg[cpu] = arg; + flush_cache_all(); +} - for (i = 0; i < ncores; i++) - set_cpu_possible(i, true); +#ifdef CONFIG_HOTPLUG_CPU +bool shmobile_smp_cpu_can_disable(unsigned int cpu) +{ + return true; /* Hotplug of any CPU is supported */ } +#endif