* translated to user's virtual addr later.
*/
host_sys_buf = chnl_packet_obj->host_sys_buf;
- ioc.pbuf = chnl_packet_obj->host_user_buf;
+ ioc.buf = chnl_packet_obj->host_user_buf;
ioc.byte_size = chnl_packet_obj->byte_size;
ioc.buf_size = chnl_packet_obj->buf_size;
ioc.arg = chnl_packet_obj->arg;
list_add_tail(&chnl_packet_obj->link,
&pchnl->free_packets_list);
} else {
- ioc.pbuf = NULL;
+ ioc.buf = NULL;
ioc.byte_size = 0;
ioc.arg = 0;
ioc.buf_size = 0;
spin_unlock_bh(&pchnl->chnl_mgr_obj->chnl_mgr_lock);
if (dequeue_ioc
&& (pchnl->chnl_type == CHNL_PCPY && pchnl->chnl_id > 1)) {
- if (!(ioc.pbuf < (void *)USERMODE_ADDR))
+ if (!(ioc.buf < (void *)USERMODE_ADDR))
goto func_cont;
/* If the addr is in user mode, then copy it */
- if (!host_sys_buf || !ioc.pbuf) {
+ if (!host_sys_buf || !ioc.buf) {
status = -EFAULT;
goto func_cont;
}
goto func_cont1;
/*host_user_buf */
- status = copy_to_user(ioc.pbuf, host_sys_buf, ioc.byte_size);
+ status = copy_to_user(ioc.buf, host_sys_buf, ioc.byte_size);
if (status) {
if (current->flags & PF_EXITING)
status = 0;
pchnl->sync_event = sync_event;
/* Get the process handle */
pchnl->process = current->tgid;
- pchnl->pcb_arg = 0;
+ pchnl->cb_arg = 0;
pchnl->bytes_moved = 0;
/* Default to proc-copy */
pchnl->chnl_type = CHNL_PCPY;
struct msg_ctrl *msg_output_ctrl;
u8 *msg_input; /* Address of input messages */
u8 *msg_output; /* Address of output messages */
- u32 usm_buf_size; /* Size of a shared memory I/O channel */
+ u32 sm_buf_size; /* Size of a shared memory I/O channel */
bool shared_irq; /* Is this IRQ shared? */
u32 word_size; /* Size in bytes of DSP word */
u16 intr_val; /* Interrupt value */
u32 trace_buffer_end; /* Trace message end address */
u32 trace_buffer_current; /* Trace message current address */
u32 gpp_read_pointer; /* GPP Read pointer to Trace buffer */
- u8 *pmsg;
+ u8 *msg;
u32 gpp_va;
u32 dsp_va;
#endif
tasklet_kill(&hio_mgr->dpc_tasklet);
#if defined(CONFIG_TIDSPBRIDGE_BACKTRACE) || defined(CONFIG_TIDSPBRIDGE_DEBUG)
- kfree(hio_mgr->pmsg);
+ kfree(hio_mgr->msg);
#endif
dsp_wdt_exit();
/* Free this IO manager object */
hio_mgr->input = (u8 *) hio_mgr->shared_mem + sizeof(struct shm);
hio_mgr->output = hio_mgr->input + (ul_shm_length -
sizeof(struct shm)) / 2;
- hio_mgr->usm_buf_size = hio_mgr->output - hio_mgr->input;
+ hio_mgr->sm_buf_size = hio_mgr->output - hio_mgr->input;
/* Set up Shared memory addresses for messaging. */
hio_mgr->msg_input_ctrl = (struct msg_ctrl *)((u8 *) hio_mgr->shared_mem
(ul_gpp_va + ul_seg1_size + ul_pad_size) +
(hio_mgr->trace_buffer_current - ul_dsp_va);
/* Calculate the size of trace buffer */
- kfree(hio_mgr->pmsg);
- hio_mgr->pmsg = kmalloc(((hio_mgr->trace_buffer_end -
+ kfree(hio_mgr->msg);
+ hio_mgr->msg = kmalloc(((hio_mgr->trace_buffer_end -
hio_mgr->trace_buffer_begin) *
hio_mgr->word_size) + 2, GFP_KERNEL);
- if (!hio_mgr->pmsg)
+ if (!hio_mgr->msg)
status = -ENOMEM;
hio_mgr->dsp_va = ul_dsp_va;
u32 io_buf_size(struct io_mgr *hio_mgr)
{
if (hio_mgr)
- return hio_mgr->usm_buf_size;
+ return hio_mgr->sm_buf_size;
else
return 0;
}
chnl_mgr_obj->output_mask &= ~(1 << chnl_id);
/* Transfer buffer to DSP side */
- chnl_packet_obj->byte_size = min(pio_mgr->usm_buf_size,
+ chnl_packet_obj->byte_size = min(pio_mgr->sm_buf_size,
chnl_packet_obj->byte_size);
memcpy(pio_mgr->output, chnl_packet_obj->host_sys_buf,
chnl_packet_obj->byte_size);
ul_new_message_length =
ul_gpp_cur_pointer - hio_mgr->gpp_read_pointer;
- memcpy(hio_mgr->pmsg,
+ memcpy(hio_mgr->msg,
(char *)hio_mgr->gpp_read_pointer,
ul_new_message_length);
- hio_mgr->pmsg[ul_new_message_length] = '\0';
+ hio_mgr->msg[ul_new_message_length] = '\0';
/*
* Advance the GPP trace pointer to DSP current
* pointer.
*/
hio_mgr->gpp_read_pointer += ul_new_message_length;
/* Print the trace messages */
- pr_info("DSPTrace: %s\n", hio_mgr->pmsg);
+ pr_info("DSPTrace: %s\n", hio_mgr->msg);
} else if (ul_gpp_cur_pointer < hio_mgr->gpp_read_pointer) {
/* Handle trace buffer wraparound */
- memcpy(hio_mgr->pmsg,
+ memcpy(hio_mgr->msg,
(char *)hio_mgr->gpp_read_pointer,
hio_mgr->trace_buffer_end -
hio_mgr->gpp_read_pointer);
ul_new_message_length =
ul_gpp_cur_pointer - hio_mgr->trace_buffer_begin;
- memcpy(&hio_mgr->pmsg[hio_mgr->trace_buffer_end -
+ memcpy(&hio_mgr->msg[hio_mgr->trace_buffer_end -
hio_mgr->gpp_read_pointer],
(char *)hio_mgr->trace_buffer_begin,
ul_new_message_length);
- hio_mgr->pmsg[hio_mgr->trace_buffer_end -
+ hio_mgr->msg[hio_mgr->trace_buffer_end -
hio_mgr->gpp_read_pointer +
ul_new_message_length] = '\0';
/*
hio_mgr->trace_buffer_begin +
ul_new_message_length;
/* Print the trace messages */
- pr_info("DSPTrace: %s\n", hio_mgr->pmsg);
+ pr_info("DSPTrace: %s\n", hio_mgr->msg);
}
}
}
return;
}
/* initialize the handle header */
- hndl->dm.hnext = hndl->dm.hprev = hndl; /* circular list */
- hndl->dm.hroot = NULL;
+ hndl->dm.next = hndl->dm.prev = hndl; /* circular list */
+ hndl->dm.root = NULL;
hndl->dm.dbthis = 0;
dlthis->myhandle = hndl; /* save away for return */
/* pointer to the section list of allocated sections */
DL_ERROR(err_alloc, sizeof(struct dbg_mirror_root));
return;
}
- mlst->hnext = NULL;
+ mlst->next = NULL;
mlst->changes = 0;
mlst->refcount = 0;
mlst->dbthis = TDATA_TO_TADDR(dlmodsym->value);
#else
mlist = (struct dbg_mirror_root *)&debug_list_header;
#endif
- hndl->dm.hroot = mlist; /* set pointer to root into our handle */
+ hndl->dm.root = mlist; /* set pointer to root into our handle */
if (!dlthis->allocated_secn_count)
return; /* no load addresses to be recorded */
/* reuse temporary symbol storage */
dllview_info.context = 0;
hndl->dm.context = 0;
/* fill in next pointer and size */
- if (mlist->hnext) {
- dbmod->next_module = TADDR_TO_TDATA(mlist->hnext->dm.dbthis);
- dbmod->next_module_size = mlist->hnext->dm.dbsiz;
+ if (mlist->next) {
+ dbmod->next_module = TADDR_TO_TDATA(mlist->next->dm.dbthis);
+ dbmod->next_module_size = mlist->next->dm.dbsiz;
} else {
dbmod->next_module_size = 0;
dbmod->next_module = 0;
}
/* Add the module handle to this processor's list
of handles with debug info */
- hndl->dm.hnext = mlist->hnext;
- if (hndl->dm.hnext)
- hndl->dm.hnext->dm.hprev = hndl;
- hndl->dm.hprev = (struct my_handle *)mlist;
- mlist->hnext = hndl; /* insert after root */
+ hndl->dm.next = mlist->next;
+ if (hndl->dm.next)
+ hndl->dm.next->dm.prev = hndl;
+ hndl->dm.prev = (struct my_handle *)mlist;
+ mlist->next = hndl; /* insert after root */
} /* init_module_handle */
/*************************************************************************
asecs->name = NULL;
alloc->dload_deallocate(alloc, asecs++);
}
- root = hndl->dm.hroot;
+ root = hndl->dm.root;
if (!root) {
/* there is a debug list containing this module */
goto func_end;
}
/* Retrieve memory context in which .dllview was allocated */
dllview_info.context = hndl->dm.context;
- if (hndl->dm.hprev == hndl)
+ if (hndl->dm.prev == hndl)
goto exitunltgt;
/* target-side dllview record is in list */
/* dequeue this record from our GPP-side mirror list */
- hndl->dm.hprev->dm.hnext = hndl->dm.hnext;
- if (hndl->dm.hnext)
- hndl->dm.hnext->dm.hprev = hndl->dm.hprev;
+ hndl->dm.prev->dm.next = hndl->dm.next;
+ if (hndl->dm.next)
+ hndl->dm.next->dm.prev = hndl->dm.prev;
/* Update next_module of previous entry in target list
* We are using mhdr here as a surrogate for either a
struct modules_header or a dll_module */
- if (hndl->dm.hnext) {
- mhdr.first_module = TADDR_TO_TDATA(hndl->dm.hnext->dm.dbthis);
- mhdr.first_module_size = hndl->dm.hnext->dm.dbsiz;
+ if (hndl->dm.next) {
+ mhdr.first_module = TADDR_TO_TDATA(hndl->dm.next->dm.dbthis);
+ mhdr.first_module_size = hndl->dm.next->dm.dbsiz;
} else {
mhdr.first_module = 0;
mhdr.first_module_size = 0;
swap_words(&mhdr, sizeof(struct modules_header) - sizeof(u16),
MODULES_HEADER_BITMAP);
}
- if (!init->writemem(init, &mhdr, hndl->dm.hprev->dm.dbthis,
+ if (!init->writemem(init, &mhdr, hndl->dm.prev->dm.dbthis,
&dllview_info, sizeof(struct modules_header) -
sizeof(mhdr.update_flag))) {
dload_syms_error(syms, dlvwrite);
struct dbg_mirror_root {
/* must be same as dbg_mirror_list; __DLModules address on target */
u32 dbthis;
- struct my_handle *hnext; /* must be same as dbg_mirror_list */
+ struct my_handle *next; /* must be same as dbg_mirror_list */
u16 changes; /* change counter */
u16 refcount; /* number of modules referencing this root */
};
struct dbg_mirror_list {
u32 dbthis;
- struct my_handle *hnext, *hprev;
- struct dbg_mirror_root *hroot;
+ struct my_handle *next, *prev;
+ struct dbg_mirror_root *root;
u16 dbsiz;
u32 context; /* Save context for .dllview memory allocation */
};
/* Abstract syncronization object */
struct sync_object *sync_event;
u32 process; /* Process which created this channel */
- u32 pcb_arg; /* Argument to use with callback */
+ u32 cb_arg; /* Argument to use with callback */
struct list_head pio_requests; /* List of IOR's to driver */
s32 cio_cs; /* Number of IOC's in queue */
s32 cio_reqs; /* Number of IORequests in queue */
struct chnl_attr {
u32 uio_reqs; /* Max # of preallocated I/O requests. */
void *event_obj; /* User supplied auto-reset event object. */
- char *pstr_event_name; /* Ptr to name of user event object. */
+ char *str_event_name; /* Ptr to name of user event object. */
void *reserved1; /* Reserved for future use. */
u32 reserved2; /* Reserved for future use. */
/* I/O completion record: */
struct chnl_ioc {
- void *pbuf; /* Buffer to be filled/emptied. */
+ void *buf; /* Buffer to be filled/emptied. */
u32 byte_size; /* Bytes transferred. */
u32 buf_size; /* Actual buffer size in bytes */
u32 status; /* Status of IO completion. */
- u32 arg; /* User argument associated with pbuf. */
+ u32 arg; /* User argument associated with buf. */
};
#endif /* CHNLDEFS_ */
struct dsp_ndbprops ndb_props;
u32 msg_segid;
u32 msg_notify_type;
- char *pstr_create_phase_fxn;
- char *pstr_delete_phase_fxn;
- char *pstr_execute_phase_fxn;
- char *pstr_i_alg_name;
+ char *str_create_phase_fxn;
+ char *str_delete_phase_fxn;
+ char *str_execute_phase_fxn;
+ char *str_i_alg_name;
/* Dynamic load properties */
u16 load_type; /* Static, dynamic, overlay */
u32 timeout; /* Timeout for blocking STRM calls */
enum dsp_strmmode strm_mode; /* mode of stream when opened */
/* DMA chnl id if dsp_strmmode is LDMA or RDMA */
- u32 udma_chnl_id;
+ u32 dma_chnl_id;
u32 dma_priority; /* DMA channel priority 0=lowest, >0=high */
};
* window handle.
*/
struct dsp_notification {
- char *ps_name;
+ char *name;
void *handle;
};
u32 buf_alignment;
u32 num_bufs;
enum dsp_strmmode strm_mode;
- u32 udma_chnl_id;
+ u32 dma_chnl_id;
u32 dma_priority;
};
/* New structure (member of process context) abstracts NODE resource info */
struct node_res_object {
- void *hnode;
+ void *node;
s32 node_allocated; /* Node status */
s32 heap_allocated; /* Heap status */
s32 streams_allocated; /* Streams status */
/* New structure (member of process context) abstracts stream resource info */
struct strm_res_object {
s32 stream_allocated; /* Stream status */
- void *hstream;
+ void *stream;
u32 num_bufs;
u32 dir;
int id;
struct {
void *processor;
- u8 __user *pbuf;
+ u8 __user *buf;
u8 __user *psize;
u32 max_size;
} args_proc_gettrace;
} args_node_allocate;
struct {
- void *hnode;
+ void *node;
u32 usize;
struct dsp_bufferattr __user *pattr;
- u8 *__user *pbuffer;
+ u8 *__user *buffer;
} args_node_allocmsgbuf;
struct {
- void *hnode;
+ void *node;
s32 prio;
} args_node_changepriority;
struct {
- void *hnode;
+ void *node;
u32 stream_id;
void *other_node;
u32 other_stream;
} args_node_connect;
struct {
- void *hnode;
+ void *node;
} args_node_create;
struct {
- void *hnode;
+ void *node;
} args_node_delete;
struct {
- void *hnode;
+ void *node;
struct dsp_bufferattr __user *pattr;
- u8 *pbuffer;
+ u8 *buffer;
} args_node_freemsgbuf;
struct {
- void *hnode;
+ void *node;
struct dsp_nodeattr __user *pattr;
u32 attr_size;
} args_node_getattr;
struct {
- void *hnode;
+ void *node;
struct dsp_msg __user *message;
u32 timeout;
} args_node_getmessage;
struct {
- void *hnode;
+ void *node;
} args_node_pause;
struct {
- void *hnode;
+ void *node;
struct dsp_msg __user *message;
u32 timeout;
} args_node_putmessage;
struct {
- void *hnode;
+ void *node;
u32 event_mask;
u32 notify_type;
struct dsp_notification __user *hnotification;
} args_node_registernotify;
struct {
- void *hnode;
+ void *node;
} args_node_run;
struct {
- void *hnode;
+ void *node;
int __user *pstatus;
} args_node_terminate;
/* STRM module */
struct {
- void *hstream;
+ void *stream;
u32 usize;
u8 *__user *ap_buffer;
u32 num_bufs;
} args_strm_allocatebuffer;
struct {
- void *hstream;
+ void *stream;
} args_strm_close;
struct {
- void *hstream;
+ void *stream;
u8 *__user *ap_buffer;
u32 num_bufs;
} args_strm_freebuffer;
struct {
- void *hstream;
+ void *stream;
void **ph_event;
} args_strm_geteventhandle;
struct {
- void *hstream;
+ void *stream;
struct stream_info __user *stream_info;
u32 stream_info_size;
} args_strm_getinfo;
struct {
- void *hstream;
+ void *stream;
bool flush_flag;
} args_strm_idle;
struct {
- void *hstream;
- u8 *pbuffer;
+ void *stream;
+ u8 *buffer;
u32 dw_bytes;
u32 dw_buf_size;
u32 arg;
} args_strm_issue;
struct {
- void *hnode;
+ void *node;
u32 direction;
u32 index;
struct strm_attr __user *attr_in;
} args_strm_open;
struct {
- void *hstream;
+ void *stream;
u8 *__user *buf_ptr;
u32 __user *bytes;
u32 __user *buf_size_ptr;
} args_strm_reclaim;
struct {
- void *hstream;
+ void *stream;
u32 event_mask;
u32 notify_type;
struct dsp_notification __user *hnotification;
struct strm_attr {
void *user_event;
- char *pstr_event_name;
+ char *str_event_name;
void *virt_base; /* Process virtual base address of
* mapped SM */
u32 virt_size; /* Size of virtual space in bytes */
} else {
status = -ENOMEM;
}
- CP_TO_USR(args->args_proc_gettrace.pbuf, pbuf, status,
+ CP_TO_USR(args->args_proc_gettrace.buf, pbuf, status,
args->args_proc_gettrace.max_size);
kfree(pbuf);
void *hprocessor = ((struct process_context *)pr_ctxt)->processor;
/* Initialize the notification data structure */
- notification.ps_name = NULL;
+ notification.name = NULL;
notification.handle = NULL;
status = proc_register_notify(hprocessor,
struct node_res_object *node_res;
find_node_handle(&node_res, pr_ctxt,
- args->args_node_allocmsgbuf.hnode);
+ args->args_node_allocmsgbuf.node);
if (!node_res)
return -EFAULT;
}
/* argument */
- CP_FM_USR(&pbuffer, args->args_node_allocmsgbuf.pbuffer, status, 1);
+ CP_FM_USR(&pbuffer, args->args_node_allocmsgbuf.buffer, status, 1);
if (!status) {
- status = node_alloc_msg_buf(node_res->hnode,
+ status = node_alloc_msg_buf(node_res->node,
args->args_node_allocmsgbuf.usize,
pattr, &pbuffer);
}
- CP_TO_USR(args->args_node_allocmsgbuf.pbuffer, &pbuffer, status, 1);
+ CP_TO_USR(args->args_node_allocmsgbuf.buffer, &pbuffer, status, 1);
return status;
}
struct node_res_object *node_res;
find_node_handle(&node_res, pr_ctxt,
- args->args_node_changepriority.hnode);
+ args->args_node_changepriority.node);
if (!node_res)
return -EFAULT;
- ret = node_change_priority(node_res->hnode,
+ ret = node_change_priority(node_res->node,
args->args_node_changepriority.prio);
return ret;
struct node_res_object *node_res1, *node_res2;
struct node_object *node1 = NULL, *node2 = NULL;
- if ((int)args->args_node_connect.hnode != DSP_HGPPNODE) {
+ if ((int)args->args_node_connect.node != DSP_HGPPNODE) {
find_node_handle(&node_res1, pr_ctxt,
- args->args_node_connect.hnode);
+ args->args_node_connect.node);
if (node_res1)
- node1 = node_res1->hnode;
+ node1 = node_res1->node;
} else {
- node1 = args->args_node_connect.hnode;
+ node1 = args->args_node_connect.node;
}
if ((int)args->args_node_connect.other_node != DSP_HGPPNODE) {
find_node_handle(&node_res2, pr_ctxt,
args->args_node_connect.other_node);
if (node_res2)
- node2 = node_res2->hnode;
+ node2 = node_res2->node;
} else {
node2 = args->args_node_connect.other_node;
}
u32 ret;
struct node_res_object *node_res;
- find_node_handle(&node_res, pr_ctxt, args->args_node_create.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_node_create.node);
if (!node_res)
return -EFAULT;
- ret = node_create(node_res->hnode);
+ ret = node_create(node_res->node);
return ret;
}
u32 ret;
struct node_res_object *node_res;
- find_node_handle(&node_res, pr_ctxt, args->args_node_delete.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_node_delete.node);
if (!node_res)
return -EFAULT;
struct dsp_bufferattr attr;
struct node_res_object *node_res;
- find_node_handle(&node_res, pr_ctxt, args->args_node_freemsgbuf.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_node_freemsgbuf.node);
if (!node_res)
return -EFAULT;
}
- if (!args->args_node_freemsgbuf.pbuffer)
+ if (!args->args_node_freemsgbuf.buffer)
return -EFAULT;
if (!status) {
- status = node_free_msg_buf(node_res->hnode,
- args->args_node_freemsgbuf.pbuffer,
+ status = node_free_msg_buf(node_res->node,
+ args->args_node_freemsgbuf.buffer,
pattr);
}
struct dsp_nodeattr attr;
struct node_res_object *node_res;
- find_node_handle(&node_res, pr_ctxt, args->args_node_getattr.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_node_getattr.node);
if (!node_res)
return -EFAULT;
- status = node_get_attr(node_res->hnode, &attr,
+ status = node_get_attr(node_res->node, &attr,
args->args_node_getattr.attr_size);
CP_TO_USR(args->args_node_getattr.pattr, &attr, status, 1);
struct dsp_msg msg;
struct node_res_object *node_res;
- find_node_handle(&node_res, pr_ctxt, args->args_node_getmessage.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_node_getmessage.node);
if (!node_res)
return -EFAULT;
- status = node_get_message(node_res->hnode, &msg,
+ status = node_get_message(node_res->node, &msg,
args->args_node_getmessage.timeout);
CP_TO_USR(args->args_node_getmessage.message, &msg, status, 1);
u32 ret;
struct node_res_object *node_res;
- find_node_handle(&node_res, pr_ctxt, args->args_node_pause.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_node_pause.node);
if (!node_res)
return -EFAULT;
- ret = node_pause(node_res->hnode);
+ ret = node_pause(node_res->node);
return ret;
}
struct dsp_msg msg;
struct node_res_object *node_res;
- find_node_handle(&node_res, pr_ctxt, args->args_node_putmessage.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_node_putmessage.node);
if (!node_res)
return -EFAULT;
if (!status) {
status =
- node_put_message(node_res->hnode, &msg,
+ node_put_message(node_res->node, &msg,
args->args_node_putmessage.timeout);
}
struct node_res_object *node_res;
find_node_handle(&node_res, pr_ctxt,
- args->args_node_registernotify.hnode);
+ args->args_node_registernotify.node);
if (!node_res)
return -EFAULT;
/* Initialize the notification data structure */
- notification.ps_name = NULL;
+ notification.name = NULL;
notification.handle = NULL;
if (!args->args_proc_register_notify.event_mask)
args->args_proc_register_notify.hnotification,
status, 1);
- status = node_register_notify(node_res->hnode,
+ status = node_register_notify(node_res->node,
args->args_node_registernotify.event_mask,
args->args_node_registernotify.
notify_type, ¬ification);
u32 ret;
struct node_res_object *node_res;
- find_node_handle(&node_res, pr_ctxt, args->args_node_run.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_node_run.node);
if (!node_res)
return -EFAULT;
- ret = node_run(node_res->hnode);
+ ret = node_run(node_res->node);
return ret;
}
int tempstatus;
struct node_res_object *node_res;
- find_node_handle(&node_res, pr_ctxt, args->args_node_terminate.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_node_terminate.node);
if (!node_res)
return -EFAULT;
- status = node_terminate(node_res->hnode, &tempstatus);
+ status = node_terminate(node_res->node, &tempstatus);
CP_TO_USR(args->args_node_terminate.pstatus, &tempstatus, status, 1);
struct strm_res_object *strm_res;
find_strm_handle(&strm_res, pr_ctxt,
- args->args_strm_allocatebuffer.hstream);
+ args->args_strm_allocatebuffer.stream);
if (!strm_res)
return -EFAULT;
{
struct strm_res_object *strm_res;
- find_strm_handle(&strm_res, pr_ctxt, args->args_strm_close.hstream);
+ find_strm_handle(&strm_res, pr_ctxt, args->args_strm_close.stream);
if (!strm_res)
return -EFAULT;
struct strm_res_object *strm_res;
find_strm_handle(&strm_res, pr_ctxt,
- args->args_strm_freebuffer.hstream);
+ args->args_strm_freebuffer.stream);
if (!strm_res)
return -EFAULT;
struct strm_res_object *strm_res;
find_strm_handle(&strm_res, pr_ctxt,
- args->args_strm_getinfo.hstream);
+ args->args_strm_getinfo.stream);
if (!strm_res)
return -EFAULT;
strm_info.user_strm = &user;
if (!status) {
- status = strm_get_info(strm_res->hstream,
+ status = strm_get_info(strm_res->stream,
&strm_info,
args->args_strm_getinfo.
stream_info_size);
u32 ret;
struct strm_res_object *strm_res;
- find_strm_handle(&strm_res, pr_ctxt, args->args_strm_idle.hstream);
+ find_strm_handle(&strm_res, pr_ctxt, args->args_strm_idle.stream);
if (!strm_res)
return -EFAULT;
- ret = strm_idle(strm_res->hstream, args->args_strm_idle.flush_flag);
+ ret = strm_idle(strm_res->stream, args->args_strm_idle.flush_flag);
return ret;
}
int status = 0;
struct strm_res_object *strm_res;
- find_strm_handle(&strm_res, pr_ctxt, args->args_strm_issue.hstream);
+ find_strm_handle(&strm_res, pr_ctxt, args->args_strm_issue.stream);
if (!strm_res)
return -EFAULT;
- if (!args->args_strm_issue.pbuffer)
+ if (!args->args_strm_issue.buffer)
return -EFAULT;
/* No need of doing CP_FM_USR for the user buffer (pbuffer)
as this is done in Bridge internal function bridge_chnl_add_io_req
in chnl_sm.c */
- status = strm_issue(strm_res->hstream,
- args->args_strm_issue.pbuffer,
+ status = strm_issue(strm_res->stream,
+ args->args_strm_issue.buffer,
args->args_strm_issue.dw_bytes,
args->args_strm_issue.dw_buf_size,
args->args_strm_issue.arg);
struct node_res_object *node_res;
int strmid;
- find_node_handle(&node_res, pr_ctxt, args->args_strm_open.hnode);
+ find_node_handle(&node_res, pr_ctxt, args->args_strm_open.node);
if (!node_res)
return -EFAULT;
}
}
- status = strm_open(node_res->hnode,
+ status = strm_open(node_res->node,
args->args_strm_open.direction,
args->args_strm_open.index, &attr, &strm_res_obj,
pr_ctxt);
u32 ul_buf_size;
struct strm_res_object *strm_res;
- find_strm_handle(&strm_res, pr_ctxt, args->args_strm_reclaim.hstream);
+ find_strm_handle(&strm_res, pr_ctxt, args->args_strm_reclaim.stream);
if (!strm_res)
return -EFAULT;
- status = strm_reclaim(strm_res->hstream, &buf_ptr,
+ status = strm_reclaim(strm_res->stream, &buf_ptr,
&ul_bytes, &ul_buf_size, &dw_arg);
CP_TO_USR(args->args_strm_reclaim.buf_ptr, &buf_ptr, status, 1);
CP_TO_USR(args->args_strm_reclaim.bytes, &ul_bytes, status, 1);
struct strm_res_object *strm_res;
find_strm_handle(&strm_res, pr_ctxt,
- args->args_strm_registernotify.hstream);
+ args->args_strm_registernotify.stream);
if (!strm_res)
return -EFAULT;
/* Initialize the notification data structure */
- notification.ps_name = NULL;
+ notification.name = NULL;
notification.handle = NULL;
- status = strm_register_notify(strm_res->hstream,
+ status = strm_register_notify(strm_res->stream,
args->args_strm_registernotify.event_mask,
args->args_strm_registernotify.
notify_type, ¬ification);
if (!strm_res)
return -EFAULT;
- strm_tab[i] = strm_res->hstream;
+ strm_tab[i] = strm_res->stream;
}
if (!status) {
gen_obj->obj_data.node_obj.ndb_props.timeout = atoi(token);
token = strsep(&psz_cur, seps);
- /* char *pstr_create_phase_fxn */
+ /* char *str_create_phase_fxn */
DBC_REQUIRE(token);
token_len = strlen(token);
- gen_obj->obj_data.node_obj.pstr_create_phase_fxn =
+ gen_obj->obj_data.node_obj.str_create_phase_fxn =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(gen_obj->obj_data.node_obj.pstr_create_phase_fxn,
+ strncpy(gen_obj->obj_data.node_obj.str_create_phase_fxn,
token, token_len);
- gen_obj->obj_data.node_obj.pstr_create_phase_fxn[token_len] =
+ gen_obj->obj_data.node_obj.str_create_phase_fxn[token_len] =
'\0';
token = strsep(&psz_cur, seps);
- /* char *pstr_execute_phase_fxn */
+ /* char *str_execute_phase_fxn */
DBC_REQUIRE(token);
token_len = strlen(token);
- gen_obj->obj_data.node_obj.pstr_execute_phase_fxn =
+ gen_obj->obj_data.node_obj.str_execute_phase_fxn =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(gen_obj->obj_data.node_obj.pstr_execute_phase_fxn,
+ strncpy(gen_obj->obj_data.node_obj.str_execute_phase_fxn,
token, token_len);
- gen_obj->obj_data.node_obj.pstr_execute_phase_fxn[token_len] =
+ gen_obj->obj_data.node_obj.str_execute_phase_fxn[token_len] =
'\0';
token = strsep(&psz_cur, seps);
- /* char *pstr_delete_phase_fxn */
+ /* char *str_delete_phase_fxn */
DBC_REQUIRE(token);
token_len = strlen(token);
- gen_obj->obj_data.node_obj.pstr_delete_phase_fxn =
+ gen_obj->obj_data.node_obj.str_delete_phase_fxn =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(gen_obj->obj_data.node_obj.pstr_delete_phase_fxn,
+ strncpy(gen_obj->obj_data.node_obj.str_delete_phase_fxn,
token, token_len);
- gen_obj->obj_data.node_obj.pstr_delete_phase_fxn[token_len] =
+ gen_obj->obj_data.node_obj.str_delete_phase_fxn[token_len] =
'\0';
token = strsep(&psz_cur, seps);
gen_obj->obj_data.node_obj.msg_notify_type = atoi(token);
token = strsep(&psz_cur, seps);
- /* char *pstr_i_alg_name */
+ /* char *str_i_alg_name */
if (token) {
token_len = strlen(token);
- gen_obj->obj_data.node_obj.pstr_i_alg_name =
+ gen_obj->obj_data.node_obj.str_i_alg_name =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(gen_obj->obj_data.node_obj.pstr_i_alg_name,
+ strncpy(gen_obj->obj_data.node_obj.str_i_alg_name,
token, token_len);
- gen_obj->obj_data.node_obj.pstr_i_alg_name[token_len] =
+ gen_obj->obj_data.node_obj.str_i_alg_name[token_len] =
'\0';
token = strsep(&psz_cur, seps);
}
struct chnl_mgr *chnl_mgr; /* Channel manager */
struct chnl_object *chnl_to_dsp; /* Chnl for commands to RMS */
struct chnl_object *chnl_from_dsp; /* Chnl for replies from RMS */
- u8 *pbuf; /* Buffer for commands, replies */
+ u8 *buf; /* Buffer for commands, replies */
u32 bufsize; /* buf size in bytes */
u32 bufsize_rms; /* buf size in RMS words */
u32 char_size; /* Size of DSP character */
/* Allocate buffer for commands, replies */
disp_obj->bufsize = disp_attrs->chnl_buf_size;
disp_obj->bufsize_rms = RMS_COMMANDBUFSIZE;
- disp_obj->pbuf = kzalloc(disp_obj->bufsize, GFP_KERNEL);
- if (disp_obj->pbuf == NULL)
+ disp_obj->buf = kzalloc(disp_obj->bufsize, GFP_KERNEL);
+ if (disp_obj->buf == NULL)
status = -ENOMEM;
}
func_cont:
DBC_REQUIRE(hnode != NULL);
/* Send message to RMS to change priority */
- rms_cmd = (struct rms_command *)(disp_obj->pbuf);
+ rms_cmd = (struct rms_command *)(disp_obj->buf);
rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = prio;
*/
if (!status) {
total = 0; /* Total number of words in buffer so far */
- pdw_buf = (rms_word *) disp_obj->pbuf;
+ pdw_buf = (rms_word *) disp_obj->buf;
rms_cmd = (struct rms_command *)pdw_buf;
rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) (ul_create_fxn);
/*
* Fill in buffer to send to RMS
*/
- rms_cmd = (struct rms_command *)disp_obj->pbuf;
+ rms_cmd = (struct rms_command *)disp_obj->buf;
rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = (rms_word) (ul_delete_fxn);
/*
* Fill in buffer to send to RMS.
*/
- rms_cmd = (struct rms_command *)disp_obj->pbuf;
+ rms_cmd = (struct rms_command *)disp_obj->buf;
rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = (rms_word) (ul_execute_fxn);
" RMS: 0x%x\n", __func__, status);
}
}
- kfree(disp_obj->pbuf);
+ kfree(disp_obj->buf);
kfree(disp_obj);
}
*pdw_arg = (u32) NULL;
intf_fxns = disp_obj->intf_fxns;
chnl_obj = disp_obj->chnl_to_dsp;
- pbuf = disp_obj->pbuf;
+ pbuf = disp_obj->buf;
/* Send the command */
status = (*intf_fxns->chnl_add_io_req) (chnl_obj, pbuf, ul_bytes, 0,
status = -EPERM;
} else {
if (CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) {
- DBC_ASSERT(chnl_ioc_obj.pbuf == pbuf);
- if (*((int *)chnl_ioc_obj.pbuf) < 0) {
+ DBC_ASSERT(chnl_ioc_obj.buf == pbuf);
+ if (*((int *)chnl_ioc_obj.buf) < 0) {
/* Translate DSP's to kernel error */
status = -EREMOTEIO;
dev_dbg(bridge, "%s: DSP-side failed:"
*(int *)pbuf, status);
}
*pdw_arg =
- (((rms_word *) (chnl_ioc_obj.pbuf))[1]);
+ (((rms_word *) (chnl_ioc_obj.buf))[1]);
} else {
status = -EPERM;
}
goto func_end;
}
- (*node_res_obj)->hnode = hnode;
+ (*node_res_obj)->node = hnode;
retval = idr_get_new(ctxt->node_id, *node_res_obj,
&(*node_res_obj)->id);
if (retval == -EAGAIN) {
u32 node_state;
if (node_res_obj->node_allocated) {
- node_state = node_get_state(node_res_obj->hnode);
+ node_state = node_get_state(node_res_obj->node);
if (node_state <= NODE_DELETING) {
if ((node_state == NODE_RUNNING) ||
(node_state == NODE_PAUSED) ||
(node_state == NODE_TERMINATING))
node_terminate
- (node_res_obj->hnode, &status);
+ (node_res_obj->node, &status);
node_delete(node_res_obj, ctxt);
}
goto func_end;
}
- (*pstrm_res)->hstream = stream_obj;
+ (*pstrm_res)->stream = stream_obj;
retval = idr_get_new(ctxt->stream_id, *pstrm_res,
&(*pstrm_res)->id);
if (retval == -EAGAIN) {
}
strm_info.user_strm = &user;
user.number_bufs_in_stream = 0;
- strm_get_info(strm_res->hstream, &strm_info, sizeof(strm_info));
+ strm_get_info(strm_res->stream, &strm_info, sizeof(strm_info));
while (user.number_bufs_in_stream--)
- strm_reclaim(strm_res->hstream, &buf_ptr, &ul_bytes,
+ strm_reclaim(strm_res->stream, &buf_ptr, &ul_bytes,
(u32 *) &ul_buf_size, &dw_arg);
strm_close(strm_res, ctxt);
return 0;
}
}
/* These were allocated in dcd_get_object_def */
- kfree(obj_def.obj_data.node_obj.pstr_create_phase_fxn);
+ kfree(obj_def.obj_data.node_obj.str_create_phase_fxn);
- kfree(obj_def.obj_data.node_obj.pstr_execute_phase_fxn);
+ kfree(obj_def.obj_data.node_obj.str_execute_phase_fxn);
- kfree(obj_def.obj_data.node_obj.pstr_delete_phase_fxn);
+ kfree(obj_def.obj_data.node_obj.str_delete_phase_fxn);
- kfree(obj_def.obj_data.node_obj.pstr_i_alg_name);
+ kfree(obj_def.obj_data.node_obj.str_i_alg_name);
func_end:
return status;
struct dcd_genericobj dcd_props; /* Node properties from DCD */
struct dsp_cbdata *pargs; /* Optional args to pass to node */
struct ntfy_object *ntfy_obj; /* Manages registered notifications */
- char *pstr_dev_name; /* device name, if device node */
+ char *str_dev_name; /* device name, if device node */
struct sync_object *sync_done; /* Synchronize node_terminate */
s32 exit_status; /* execute function return status */
}
/* Set up create args */
pstream->type = DEVICECONNECT;
- dw_length = strlen(dev_node_obj->pstr_dev_name);
+ dw_length = strlen(dev_node_obj->str_dev_name);
if (conn_param)
pstrm_def->sz_device = kzalloc(dw_length + 1 +
conn_param->cb_data,
}
/* Copy device name */
strncpy(pstrm_def->sz_device,
- dev_node_obj->pstr_dev_name, dw_length);
+ dev_node_obj->str_dev_name, dw_length);
if (conn_param)
strncat(pstrm_def->sz_device,
(char *)conn_param->node_data,
status = hnode_mgr->nldr_fxns.get_fxn_addr
(hnode->nldr_node_obj,
hnode->dcd_props.obj_data.node_obj.
- pstr_i_alg_name,
+ str_i_alg_name,
&hnode->create_args.asa.
task_arg_obj.dais_arg);
}
int node_delete(struct node_res_object *noderes,
struct process_context *pr_ctxt)
{
- struct node_object *pnode = noderes->hnode;
+ struct node_object *pnode = noderes->node;
struct node_mgr *hnode_mgr;
struct proc_object *hprocessor;
struct disp_object *disp_obj;
kfree(hnode->stream_connect);
hnode->stream_connect = NULL;
}
- kfree(hnode->pstr_dev_name);
- hnode->pstr_dev_name = NULL;
+ kfree(hnode->str_dev_name);
+ hnode->str_dev_name = NULL;
if (hnode->ntfy_obj) {
ntfy_delete(hnode->ntfy_obj);
}
/* These were allocated in dcd_get_object_def (via node_allocate) */
- kfree(hnode->dcd_props.obj_data.node_obj.pstr_create_phase_fxn);
- hnode->dcd_props.obj_data.node_obj.pstr_create_phase_fxn = NULL;
+ kfree(hnode->dcd_props.obj_data.node_obj.str_create_phase_fxn);
+ hnode->dcd_props.obj_data.node_obj.str_create_phase_fxn = NULL;
- kfree(hnode->dcd_props.obj_data.node_obj.pstr_execute_phase_fxn);
- hnode->dcd_props.obj_data.node_obj.pstr_execute_phase_fxn = NULL;
+ kfree(hnode->dcd_props.obj_data.node_obj.str_execute_phase_fxn);
+ hnode->dcd_props.obj_data.node_obj.str_execute_phase_fxn = NULL;
- kfree(hnode->dcd_props.obj_data.node_obj.pstr_delete_phase_fxn);
- hnode->dcd_props.obj_data.node_obj.pstr_delete_phase_fxn = NULL;
+ kfree(hnode->dcd_props.obj_data.node_obj.str_delete_phase_fxn);
+ hnode->dcd_props.obj_data.node_obj.str_delete_phase_fxn = NULL;
- kfree(hnode->dcd_props.obj_data.node_obj.pstr_i_alg_name);
- hnode->dcd_props.obj_data.node_obj.pstr_i_alg_name = NULL;
+ kfree(hnode->dcd_props.obj_data.node_obj.str_i_alg_name);
+ hnode->dcd_props.obj_data.node_obj.str_i_alg_name = NULL;
/* Free all SM address translator resources */
kfree(hnode->xlator);
switch (phase) {
case CREATEPHASE:
pstr_fxn_name =
- hnode->dcd_props.obj_data.node_obj.pstr_create_phase_fxn;
+ hnode->dcd_props.obj_data.node_obj.str_create_phase_fxn;
break;
case EXECUTEPHASE:
pstr_fxn_name =
- hnode->dcd_props.obj_data.node_obj.pstr_execute_phase_fxn;
+ hnode->dcd_props.obj_data.node_obj.str_execute_phase_fxn;
break;
case DELETEPHASE:
pstr_fxn_name =
- hnode->dcd_props.obj_data.node_obj.pstr_delete_phase_fxn;
+ hnode->dcd_props.obj_data.node_obj.str_delete_phase_fxn;
break;
default:
/* Should never get here */
DBC_REQUIRE(pndb_props->ac_name);
len = strlen(pndb_props->ac_name);
DBC_ASSERT(len < MAXDEVNAMELEN);
- hnode->pstr_dev_name = kzalloc(len + 1, GFP_KERNEL);
- if (hnode->pstr_dev_name == NULL) {
+ hnode->str_dev_name = kzalloc(len + 1, GFP_KERNEL);
+ if (hnode->str_dev_name == NULL) {
status = -ENOMEM;
} else {
- strncpy(hnode->pstr_dev_name,
+ strncpy(hnode->str_dev_name,
pndb_props->ac_name, len);
}
}
*/
mutex_lock(&hnode_mgr->node_mgr_lock);
- dcd_node_props.pstr_create_phase_fxn = NULL;
- dcd_node_props.pstr_execute_phase_fxn = NULL;
- dcd_node_props.pstr_delete_phase_fxn = NULL;
- dcd_node_props.pstr_i_alg_name = NULL;
+ dcd_node_props.str_create_phase_fxn = NULL;
+ dcd_node_props.str_execute_phase_fxn = NULL;
+ dcd_node_props.str_delete_phase_fxn = NULL;
+ dcd_node_props.str_i_alg_name = NULL;
status = dcd_get_object_def(hnode_mgr->dcd_mgr,
(struct dsp_uuid *)node_uuid, DSP_DCDNODETYPE,
if (!status) {
*node_props = dcd_node_props.ndb_props;
- kfree(dcd_node_props.pstr_create_phase_fxn);
+ kfree(dcd_node_props.str_create_phase_fxn);
- kfree(dcd_node_props.pstr_execute_phase_fxn);
+ kfree(dcd_node_props.str_execute_phase_fxn);
- kfree(dcd_node_props.pstr_delete_phase_fxn);
+ kfree(dcd_node_props.str_delete_phase_fxn);
- kfree(dcd_node_props.pstr_i_alg_name);
+ kfree(dcd_node_props.str_i_alg_name);
}
/* Leave the critical section, we're done. */
mutex_unlock(&hnode_mgr->node_mgr_lock);
u32 dir; /* DSP_TONODE or DSP_FROMNODE */
u32 timeout;
u32 num_bufs; /* Max # of bufs allowed in stream */
- u32 un_bufs_in_strm; /* Current # of bufs in stream */
+ u32 bufs_in_strm; /* Current # of bufs in stream */
u32 bytes; /* bytes transferred since idled */
/* STREAM_IDLE, STREAM_READY, ... */
enum dsp_streamstate strm_state;
void *user_event; /* Saved for strm_get_info() */
enum dsp_strmmode strm_mode; /* STRMMODE_[PROCCOPY][ZEROCOPY]... */
- u32 udma_chnl_id; /* DMA chnl id */
+ u32 dma_chnl_id; /* DMA chnl id */
u32 dma_priority; /* DMA priority:DMAPRI_[LOW][HIGH] */
u32 segment_id; /* >0 is SM segment.=0 is local heap */
u32 buf_alignment; /* Alignment for stream bufs */
int status = 0;
u32 alloc_cnt = 0;
u32 i;
- struct strm_object *stream_obj = strmres->hstream;
+ struct strm_object *stream_obj = strmres->stream;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(ap_buffer != NULL);
struct bridge_drv_interface *intf_fxns;
struct chnl_info chnl_info_obj;
int status = 0;
- struct strm_object *stream_obj = strmres->hstream;
+ struct strm_object *stream_obj = strmres->stream;
DBC_REQUIRE(refs > 0);
{
int status = 0;
u32 i = 0;
- struct strm_object *stream_obj = strmres->hstream;
+ struct strm_object *stream_obj = strmres->stream;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(ap_buffer != NULL);
pattr->stream_attr_in->segment_id;
strm_obj->buf_alignment =
pattr->stream_attr_in->buf_alignment;
- strm_obj->udma_chnl_id =
- pattr->stream_attr_in->udma_chnl_id;
+ strm_obj->dma_chnl_id =
+ pattr->stream_attr_in->dma_chnl_id;
strm_obj->dma_priority =
pattr->stream_attr_in->dma_priority;
chnl_attr_obj.uio_reqs =
strm_obj->strm_mode = STRMMODE_PROCCOPY;
strm_obj->segment_id = 0; /* local mem */
strm_obj->buf_alignment = 0;
- strm_obj->udma_chnl_id = 0;
+ strm_obj->dma_chnl_id = 0;
strm_obj->dma_priority = 0;
chnl_attr_obj.uio_reqs = DEFAULTNUMBUFS;
}
&& (!CHNL_IS_IO_CANCELLED(chnl_ioc_obj))
&& (stream_obj->strm_mode == STRMMODE_ZEROCOPY)) {
/*
- * This is a zero-copy channel so chnl_ioc_obj.pbuf
+ * This is a zero-copy channel so chnl_ioc_obj.buf
* contains the DSP address of SM. We need to
* translate it to a virtual address for the user
* thread to access.
* Note: Could add CMM_DSPPA2VA to CMM in the future.
*/
tmp_buf = cmm_xlator_translate(stream_obj->xlator,
- chnl_ioc_obj.pbuf,
+ chnl_ioc_obj.buf,
CMM_DSPPA2PA);
if (tmp_buf != NULL) {
/* now convert this GPP Pa to Va */
if (tmp_buf == NULL)
status = -ESRCH;
- chnl_ioc_obj.pbuf = tmp_buf;
+ chnl_ioc_obj.buf = tmp_buf;
}
- *buf_ptr = chnl_ioc_obj.pbuf;
+ *buf_ptr = chnl_ioc_obj.buf;
}
func_end:
/* ensure we return a documented return code */