Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee4317f7 authored by Rene Sapiens's avatar Rene Sapiens Committed by Omar Ramirez Luna
Browse files

staging: tidspbridge: set10 remove hungarian from structs



hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:               Replacement:
hnext                   next
hnode                   node
hprev                   prev
hroot                   root
hstream                 stream
pbuf                    buf
pcb_arg                 cb_arg
pdspheap_list           dspheap_list
pmsg                    msg
ps_name                 name
pstr_create_phase_fxn   str_create_phase_fxn
pstr_delete_phase_fxn   str_delete_phase_fxn
pstr_dev_name           str_dev_name
pstr_event_name         str_event_name
pstr_execute_phase_fxn  str_execute_phase_fxn
pstr_i_alg_name         str_i_alg_name
udma_chnl_id            dma_chnl_id
un_bufs_in_strm         bufs_in_strm
usm_buf_size            sm_buf_size

Signed-off-by: default avatarRene Sapiens <rene.sapiens@ti.com>
Signed-off-by: default avatarArmando Uribe <x0095078@ti.com>
Signed-off-by: default avatarOmar Ramirez Luna <omar.ramirez@ti.com>
parent a534f17b
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -604,7 +604,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
		 * 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;
@@ -613,7 +613,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
		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;
@@ -640,11 +640,11 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
	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;
		}
@@ -652,7 +652,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
			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;
@@ -806,7 +806,7 @@ int bridge_chnl_open(struct chnl_object **chnl,
	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;
+16 −16
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ struct io_mgr {
	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 */
@@ -119,7 +119,7 @@ struct io_mgr {
	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
@@ -247,7 +247,7 @@ int bridge_io_destroy(struct io_mgr *hio_mgr)
		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 */
@@ -705,7 +705,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
	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
@@ -764,11 +764,11 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
	    (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;
@@ -786,7 +786,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
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;
}
@@ -1361,7 +1361,7 @@ static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
		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);
@@ -1704,30 +1704,30 @@ void print_dsp_debug_trace(struct io_mgr *hio_mgr)
			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';
			/*
@@ -1738,7 +1738,7 @@ void print_dsp_debug_trace(struct io_mgr *hio_mgr)
			    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);
		}
	}
}
+21 −21
Original line number Diff line number Diff line
@@ -498,8 +498,8 @@ static void allocate_sections(struct dload_state *dlthis)
		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 */
@@ -1626,7 +1626,7 @@ static void init_module_handle(struct dload_state *dlthis)
			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);
@@ -1651,7 +1651,7 @@ static void init_module_handle(struct dload_state *dlthis)
#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 */
@@ -1702,9 +1702,9 @@ static void init_module_handle(struct dload_state *dlthis)
	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;
@@ -1750,11 +1750,11 @@ static void init_module_handle(struct dload_state *dlthis)
	}
	/* 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 */

/*************************************************************************
@@ -1810,7 +1810,7 @@ int dynamic_unload_module(void *mhandle,
			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;
@@ -1820,20 +1820,20 @@ int dynamic_unload_module(void *mhandle,
	}
	/* 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;
@@ -1851,7 +1851,7 @@ int dynamic_unload_module(void *mhandle,
		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);
+3 −3
Original line number Diff line number Diff line
@@ -78,15 +78,15 @@ struct my_handle;
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 */
};
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ struct chnl_object {
	/* 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 */
Loading