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

Kazunori Asayama asayama at sm.sony.co.jp
Wed Dec 3 19:51:22 EST 2008


Yuji Mano wrote:
> 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>
> 
> ---
>  modules/task/src/mpu/module/task_module.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- a/modules/task/src/mpu/module/task_module.c
> +++ b/modules/task/src/mpu/module/task_module.c
> @@ -431,6 +431,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);
> 

You also need a sync after restoring a task context.

-- 
(ASAYAMA Kazunori
  (asayama at sm.sony.co.jp))
t



More information about the cbe-oss-dev mailing list