diff options
author | Deng-Cheng Zhu <dengcheng.zhu@imgtec.com> | 2013-10-30 15:52:10 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-01-22 20:19:02 +0100 |
commit | 1336113a6c93fa345f7465e066313e5629f581d9 (patch) | |
tree | 9c20905bc377b7c1fa41b34cdfd305f687b9a10b /arch/mips/mti-malta/malta-amon.c | |
parent | da615cf603e209fdf2e5917d84e070b34dd8daa1 (diff) |
MIPS: APRP: Add support for Malta CMP platform.
Malta with multi-core CM platforms can now use APRP functionality.
Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Reviewed-by: Qais Yousef <Qais.Yousef@imgtec.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6096/
Diffstat (limited to 'arch/mips/mti-malta/malta-amon.c')
-rw-r--r-- | arch/mips/mti-malta/malta-amon.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/arch/mips/mti-malta/malta-amon.c b/arch/mips/mti-malta/malta-amon.c index 1e478445801..917df6d643c 100644 --- a/arch/mips/mti-malta/malta-amon.c +++ b/arch/mips/mti-malta/malta-amon.c @@ -25,6 +25,7 @@ #include <asm/addrspace.h> #include <asm/mips-boards/launch.h> #include <asm/mipsmtregs.h> +#include <asm/vpe.h> int amon_cpu_avail(int cpu) { @@ -48,7 +49,7 @@ int amon_cpu_avail(int cpu) return 1; } -void amon_cpu_start(int cpu, +int amon_cpu_start(int cpu, unsigned long pc, unsigned long sp, unsigned long gp, unsigned long a0) { @@ -56,10 +57,10 @@ void amon_cpu_start(int cpu, (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH); if (!amon_cpu_avail(cpu)) - return; + return -1; if (cpu == smp_processor_id()) { pr_debug("launch: I am cpu%d!\n", cpu); - return; + return -1; } launch += cpu; @@ -78,4 +79,21 @@ void amon_cpu_start(int cpu, ; smp_rmb(); /* Target will be updating flags soon */ pr_debug("launch: cpu%d gone!\n", cpu); + + return 0; +} + +#ifdef CONFIG_MIPS_VPE_LOADER +int vpe_run(struct vpe *v) +{ + struct vpe_notifications *n; + + if (amon_cpu_start(aprp_cpu_index(), v->__start, 0, 0, 0) < 0) + return -1; + + list_for_each_entry(n, &v->notify, list) + n->start(VPE_MODULE_MINOR); + + return 0; } +#endif |