The current smp code allows to trigger a restart interrupt on CPUs
offline in linux. To allow using the percpu infrastructure instead
of the pcpu_devices array, switch to the ipl cpu which is always
online before calling do_restart().
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
 extern void arch_send_call_function_single_ipi(int cpu);
 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
 
-extern void smp_call_online_cpu(void (*func)(void *), void *);
 extern void smp_call_ipl_cpu(void (*func)(void *), void *);
 extern void smp_emergency_stop(void);
 
 
        tracing_off();
        debug_locks_off();
        lgr_info_log();
-       smp_call_online_cpu(__do_restart, arg);
+       smp_call_ipl_cpu(__do_restart, arg);
 }
 
 /* on halt */
 
        return cc;
 }
 
-/*
- * Call function on an online CPU.
- */
-void smp_call_online_cpu(void (*func)(void *), void *data)
-{
-       struct pcpu *pcpu;
-
-       /* Use the current cpu if it is online. */
-       pcpu = pcpu_find_address(cpu_online_mask, stap());
-       if (!pcpu)
-               /* Use the first online cpu. */
-               pcpu = pcpu_devices + cpumask_first(cpu_online_mask);
-       pcpu_delegate(pcpu, func, data, (unsigned long) restart_stack);
-}
-
 /*
  * Call function on the ipl CPU.
  */