I want to hotplug CPU-1 in 4 cpu system which is based on arm v8 arch.
I am using Linux kernel 3.18.18.
I want to add cpu1 at run time.
I tried below code base.
for (i=0; i<4; i++) {
pr_err ("%s: checking online cpus : %d ", __func__, i);
if (cpu_online(i))
continue;
pr_err("Onlining CPU%d\n", i);
if (cpu_up(i)) {
pr_err("Onlining CPU%d failed\n", i);
} else
pr_err("Onlining CPU%d usng smp_call \n", i);
}
It failed with below error :
[ 7.085328] psci: failed to boot CPU2 (-22)
[ 7.089136] CPU2: failed to boot: -22
Thanks,
----------------------------------------------------------------------------------------------------------------------------------
Atul Raut
http://rautatul.weebly.com/