]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-shmobile/platsmp.c
ARM: shmobile: Introduce per-CPU SMP boot / sleep code
[karo-tx-linux.git] / arch / arm / mach-shmobile / platsmp.c
index 1f958d7b0bac77d7eff13ac83eb7d02309fe9092..d4ae616bcedb4f09c4342a8e19a0d9c7dc98f581 100644 (file)
@@ -12,6 +12,9 @@
  */
 #include <linux/init.h>
 #include <linux/smp.h>
+#include <asm/cacheflush.h>
+#include <asm/smp_plat.h>
+#include <mach/common.h>
 
 void __init shmobile_smp_init_cpus(unsigned int ncores)
 {
@@ -26,3 +29,18 @@ void __init shmobile_smp_init_cpus(unsigned int ncores)
        for (i = 0; i < ncores; i++)
                set_cpu_possible(i, true);
 }
+
+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)
+{
+       shmobile_smp_fn[cpu] = 0;
+       flush_cache_all();
+
+       shmobile_smp_mpidr[cpu] = cpu_logical_map(cpu);
+       shmobile_smp_fn[cpu] = fn;
+       shmobile_smp_arg[cpu] = arg;
+       flush_cache_all();
+}