23 #include <linux/sched.h>
27 #include <linux/errno.h>
39 #include <asm/atomic.h>
40 #include <asm/cacheflush.h>
41 #include <asm/cputype.h>
42 #include <asm/mmu_context.h>
43 #include <asm/pgtable.h>
44 #include <asm/pgalloc.h>
45 #include <asm/processor.h>
46 #include <asm/sections.h>
47 #include <asm/tlbflush.h>
48 #include <asm/ptrace.h>
99 write_pen_release(cpu);
148 pr_crit(
"CPU%u: failed to come online\n", cpu);
152 pr_err(
"CPU%u: failed to boot: %d\n", cpu, ret);
169 printk(
"CPU%u: Booted secondary processor\n", cpu);
177 cpumask_set_cpu(cpu, mm_cpumask(mm));
193 write_pen_release(-1);
204 notify_cpu_starting(cpu);
226 pr_info(
"SMP: Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
228 (bogosum / (5000/
HZ)) % 100);
235 static void (*smp_cross_call)(
const struct cpumask *,
unsigned int);
243 const char *enable_method;
255 if (!enable_method ||
strcmp(enable_method,
"spin-table")) {
256 pr_err(
"CPU %d: missing or invalid enable-method property: %s\n",
265 &cpu_release_addr[cpu])) {
266 pr_err(
"CPU %d: missing or invalid cpu-release-addr property\n",
278 pr_warning(
"no. of cores (%d) greater than configured maximum of %d - clipping\n",
291 if (max_cpus > ncores)
303 if (!cpu_release_addr[cpu])
306 release_addr =
__va(cpu_release_addr[cpu]);
336 static const char *ipi_types[
NR_IPI] = {
337 #define S(x,s) [x - IPI_RESCHEDULE] = s
339 S(IPI_CALL_FUNC,
"Function call interrupts"),
340 S(IPI_CALL_FUNC_SINGLE,
"Single function call interrupts"),
341 S(IPI_CPU_STOP,
"CPU stop interrupts"),
348 for (i = 0; i <
NR_IPI; i++) {
350 prec >= 4 ?
" " :
"");
363 for (i = 0; i <
NR_IPI; i++)
374 static void ipi_cpu_stop(
unsigned int cpu)
379 pr_crit(
"CPU%u: stopping\n", cpu);
399 struct pt_regs *old_regs = set_irq_regs(regs);
411 generic_smp_call_function_interrupt();
417 generic_smp_call_function_single_interrupt();
428 pr_crit(
"CPU%u: Unknown IPI message 0x%x\n", cpu, ipinr);
431 set_irq_regs(old_regs);
441 unsigned long timeout;
458 pr_warning(
"SMP: failed to stop secondary CPUs\n");