[Cbe-oss-dev] [PATCH 17/17 v2]MARS/modules/task: Issue spu sync

Yuji Mano yuji.mano at am.sony.com
Thu Dec 4 06:55:02 EST 2008


Issue an spu_sync() command after the task code is dma'd into MPU
storage and before the code inside MPU storage is executed.

Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>

---
v2:
 - issue spu_sync() after restoring a context and executing it

 modules/task/src/mpu/module/task_module.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/modules/task/src/mpu/module/task_module.c
+++ b/modules/task/src/mpu/module/task_module.c
@@ -291,6 +291,9 @@ static void __attribute__((noinline)) co
 	asm volatile (
 		"lqa	$sp, _task_stack;"
 	);
+
+	/* sync before executing loaded code */
+	spu_sync();
 }
 
 static void __attribute__((noinline)) context_finish(void)
@@ -431,6 +434,9 @@ void mars_module_main(void)
 		memset((void *)MARS_TASK_BASE_ADDR + task->exec_size, 0,
 			task->bss_size);
 
+		/* sync before executing loaded code */
+		spu_sync();
+
 		/* call entry function */
 		((mars_task_entry)task->entry)(
 			&task->args, &task_module_syscalls);





More information about the cbe-oss-dev mailing list