|
@@ -25,6 +25,7 @@
|
|
#include <asm/addrspace.h>
|
|
#include <asm/addrspace.h>
|
|
#include <asm/mips-boards/launch.h>
|
|
#include <asm/mips-boards/launch.h>
|
|
#include <asm/mipsmtregs.h>
|
|
#include <asm/mipsmtregs.h>
|
|
|
|
+#include <asm/vpe.h>
|
|
|
|
|
|
int amon_cpu_avail(int cpu)
|
|
int amon_cpu_avail(int cpu)
|
|
{
|
|
{
|
|
@@ -48,7 +49,7 @@ int amon_cpu_avail(int cpu)
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
-void amon_cpu_start(int cpu,
|
|
|
|
|
|
+int amon_cpu_start(int cpu,
|
|
unsigned long pc, unsigned long sp,
|
|
unsigned long pc, unsigned long sp,
|
|
unsigned long gp, unsigned long a0)
|
|
unsigned long gp, unsigned long a0)
|
|
{
|
|
{
|
|
@@ -56,10 +57,10 @@ void amon_cpu_start(int cpu,
|
|
(struct cpulaunch *)CKSEG0ADDR(CPULAUNCH);
|
|
(struct cpulaunch *)CKSEG0ADDR(CPULAUNCH);
|
|
|
|
|
|
if (!amon_cpu_avail(cpu))
|
|
if (!amon_cpu_avail(cpu))
|
|
- return;
|
|
|
|
|
|
+ return -1;
|
|
if (cpu == smp_processor_id()) {
|
|
if (cpu == smp_processor_id()) {
|
|
pr_debug("launch: I am cpu%d!\n", cpu);
|
|
pr_debug("launch: I am cpu%d!\n", cpu);
|
|
- return;
|
|
|
|
|
|
+ return -1;
|
|
}
|
|
}
|
|
launch += cpu;
|
|
launch += cpu;
|
|
|
|
|
|
@@ -78,4 +79,21 @@ void amon_cpu_start(int cpu,
|
|
;
|
|
;
|
|
smp_rmb(); /* Target will be updating flags soon */
|
|
smp_rmb(); /* Target will be updating flags soon */
|
|
pr_debug("launch: cpu%d gone!\n", cpu);
|
|
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
|