Commit 31454ebc authored by Hari Kanigeri's avatar Hari Kanigeri

SYSLINK ProcMgr fix for Procmgr Start procid

This patch fixes the ProcMgr_start function to
take correct proc_id and entry_point from the
userspace.
Reworked the patch to fix merge conflicts (Hari K)
Signed-off-by: default avatarRamesh Gupta G <grgupta@ti.com>
Signed-off-by: Hari Kanigeri<h-kanigeri2@ti.com>
parent bc56353b
......@@ -117,6 +117,7 @@ inline int processor_start(void *handle, u32 entry_pt,
/* entryPt may be 0 for some devices. Cannot check for valid/invalid. */
BUG_ON(params == NULL);
BUG_ON(proc_handle->proc_fxn_table.start == NULL);
retval = proc_handle->proc_fxn_table.start(handle, entry_pt, params);
if ((proc_handle->boot_mode == PROC_MGR_BOOTMODE_BOOT)
|| (proc_handle->boot_mode == PROC_MGR_BOOTMODE_NOLOAD))
......
......@@ -555,13 +555,12 @@ EXPORT_SYMBOL(proc_mgr_get_start_params);
* After successful completion of this function, the ProcMgr
* instance is expected to be in the proc_mgr_State_Running state.
*/
int
proc_mgr_start(void *handle, struct proc_mgr_start_params *params)
int proc_mgr_start(void *handle, u32 entry_point,
struct proc_mgr_start_params *params)
{
int retval = 0;
struct proc_mgr_object *proc_mgr_handle =
(struct proc_mgr_object *)handle;
u32 entryPt = 0;
struct proc_mgr_start_params tmp_params;
struct processor_start_params proc_params;
......@@ -584,7 +583,8 @@ proc_mgr_start(void *handle, struct proc_mgr_start_params *params)
/* Start the slave processor running. */
proc_params.params = params;
retval = processor_start(proc_mgr_handle->proc_handle,
entryPt, &proc_params);
entry_point, &proc_params);
mutex_unlock(proc_mgr_obj_state.gate_handle);
#if defined SYSLINK_USE_SYSMGR
if (retval == 0) {
......
......@@ -218,7 +218,8 @@ void proc_mgr_get_start_params(void *handle,
* starting point specified in the slave executable loaded earlier by call to
* proc_mgr_load().
*/
int proc_mgr_start(void *handle, struct proc_mgr_start_params *params);
int proc_mgr_start(void *handle, u32 entry_point,
struct proc_mgr_start_params *params);
/* Function to stop execution of the slave Processor. */
int proc_mgr_stop(void *handle);
......
......@@ -367,7 +367,9 @@ static int proc_mgr_drv_ioctl(struct inode *inode, struct file *filp,
sizeof(struct proc_mgr_start_params));
if (WARN_ON(retval != 0))
goto func_exit;
retval = proc_mgr_start(src_args.handle, &params);
retval = proc_mgr_start(src_args.handle,
src_args.entry_point, &params);
WARN_ON(retval);
}
break;
......
......@@ -322,6 +322,8 @@ struct proc_mgr_cmd_args_get_start_params {
struct proc_mgr_cmd_args commond_args;
/*Common command args */
void *handle;
/*Entry point for the image*/
u32 entry_point;
/*Handle to the ProcMgr object */
struct proc_mgr_start_params *params;
/*Pointer to the ProcMgr start params structure in which the default
......@@ -335,6 +337,8 @@ struct proc_mgr_cmd_args_start {
struct proc_mgr_cmd_args commond_args;
/*Common command args */
void *handle;
/*Entry point for the image*/
u32 entry_point;
/*Handle to the ProcMgr object */
struct proc_mgr_start_params *params;
/*Optional ProcMgr start parameters. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment