0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <linux/init.h>
0013 #include <linux/smp.h>
0014 #include <linux/io.h>
0015 #include <linux/pgtable.h>
0016
0017 #include <asm/smp_plat.h>
0018 #include <asm/prom.h>
0019 #include <asm/tlbflush.h>
0020
0021 #include "keystone.h"
0022
0023 static int keystone_smp_boot_secondary(unsigned int cpu,
0024 struct task_struct *idle)
0025 {
0026 unsigned long start = virt_to_idmap(&secondary_startup);
0027 int error;
0028
0029 pr_debug("keystone-smp: booting cpu %d, vector %08lx\n",
0030 cpu, start);
0031
0032 error = keystone_cpu_smc(KEYSTONE_MON_CPU_UP_IDX, cpu, start);
0033 if (error)
0034 pr_err("CPU %d bringup failed with %d\n", cpu, error);
0035
0036 return error;
0037 }
0038
0039 const struct smp_operations keystone_smp_ops __initconst = {
0040 .smp_boot_secondary = keystone_smp_boot_secondary,
0041 };