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

Commit 53148679 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge ca4e701e on remote branch

Change-Id: I3784ddc4330d4ebd0508690be5906caf9a5a1810
parents 94edede0 ca4e701e
Loading
Loading
Loading
Loading
+23 −15
Original line number Diff line number Diff line
@@ -483,7 +483,7 @@ struct fastrpc_file {
	/* To indicate attempt has been made to allocate memory for debug_buf */
	int debug_buf_alloced_attempted;
	/* Flag to indicate dynamic process creation status*/
	bool in_process_create;
	enum fastrpc_process_create_state dsp_process_state;
	struct completion shutdown;
};

@@ -2538,7 +2538,7 @@ static int fastrpc_mmap_remove_ssr(struct fastrpc_file *fl, int locked);
static int fastrpc_init_process(struct fastrpc_file *fl,
				struct fastrpc_ioctl_init_attrs *uproc)
{
	int err = 0, rh_hyp_done = 0;
	int err = 0, rh_hyp_done = 0, locked = 0;
	struct fastrpc_apps *me = &gfa;
	struct fastrpc_ioctl_invoke_crc ioctl;
	struct fastrpc_ioctl_init *init = &uproc->init;
@@ -2552,6 +2552,7 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
	int unsigned_request = proc_attrs && init_flags;
	int cid = fl->cid;
	struct fastrpc_channel_ctx *chan = &me->channel[cid];
	struct fastrpc_buf *init_mem;

	if (chan->unsigned_support &&
		fl->dev_minor == MINOR_NUM_DEV) {
@@ -2617,13 +2618,13 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
		} inbuf;

		spin_lock(&fl->hlock);
		if (fl->in_process_create) {
		if (fl->dsp_process_state) {
			err = -EALREADY;
			pr_err("Already in create init process\n");
			spin_unlock(&fl->hlock);
			return err;
		}
		fl->in_process_create = true;
		fl->dsp_process_state = PROCESS_CREATE_IS_INPROGRESS;
		spin_unlock(&fl->hlock);
		inbuf.pgid = fl->tgid;
		inbuf.namelen = strlen(current->comm) + 1;
@@ -2832,20 +2833,27 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
		fastrpc_mmap_free(mem, 0);
		mutex_unlock(&fl->map_mutex);
	}
	if (err) {
		if (!IS_ERR_OR_NULL(fl->init_mem)) {
			fastrpc_buf_free(fl->init_mem, 0);
			fl->init_mem = NULL;
		}
	}
	if (file) {
		mutex_lock(&fl->map_mutex);
		fastrpc_mmap_free(file, 0);
		mutex_unlock(&fl->map_mutex);
	}
	if (init->flags == FASTRPC_INIT_CREATE) {
	spin_lock(&fl->hlock);
		fl->in_process_create = false;
	locked = 1;
	if (err) {
		fl->dsp_process_state = PROCESS_CREATE_DEFAULT;
		if (!IS_ERR_OR_NULL(fl->init_mem)) {
			init_mem = fl->init_mem;
			fl->init_mem = NULL;
			locked = 0;
			spin_unlock(&fl->hlock);
			fastrpc_buf_free(init_mem, 0);
		}
	} else {
		fl->dsp_process_state = PROCESS_CREATE_SUCCESS;
	}
	if (locked) {
		locked = 0;
		spin_unlock(&fl->hlock);
	}
	return err;
@@ -3811,7 +3819,7 @@ static int fastrpc_file_free(struct fastrpc_file *fl)
	}
	spin_lock(&fl->hlock);
	fl->file_close = 1;
	fl->in_process_create = false;
	fl->dsp_process_state = PROCESS_CREATE_DEFAULT;
	spin_unlock(&fl->hlock);
	if (!IS_ERR_OR_NULL(fl->init_mem))
		fastrpc_buf_free(fl->init_mem, 0);
@@ -4213,7 +4221,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)
	fl->cid = -1;
	fl->dev_minor = dev_minor;
	fl->init_mem = NULL;
	fl->in_process_create = false;
	fl->dsp_process_state = PROCESS_CREATE_DEFAULT;
	memset(&fl->perf, 0, sizeof(fl->perf));
	fl->qos_request = 0;
	fl->dsp_proc_init = 0;
+9 −0
Original line number Diff line number Diff line
@@ -319,6 +319,15 @@ struct smq_invoke_rsp {
	int retval;	             /* invoke return value */
};

enum fastrpc_process_create_state {
	/* Process is not created */
	PROCESS_CREATE_DEFAULT			= 0,
	/* Process creation is in progress */
	PROCESS_CREATE_IS_INPROGRESS	= 1,
	/* Process creation is successful */
	PROCESS_CREATE_SUCCESS			= 2,
};

enum fastrpc_response_flags {
	NORMAL_RESPONSE = 0,
	EARLY_RESPONSE = 1,
+6 −15
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
struct dentry *my_direc;
const char delim[] = ",";
int columns = NAME_COLUMN |
	BOUND_COLUMN | STATE_COLUMN | ERROR_CODES;
BOUND_COLUMN | ERROR_CODES;

void populate_bound_rows(
	struct synx_table_row *row,
@@ -29,14 +29,13 @@ void populate_bound_rows(
	char *end)
{
	int j;
	int state = SYNX_STATE_INVALID;


	for (j = 0; j < row->num_bound_synxs;
		j++) {
		cur += scnprintf(cur, end - cur,
			"\n\tID: %d State: %s",
			row->bound_synxs[j].external_data->synx_obj,
			state);
			"\n\tID: %d ",
			row->bound_synxs[j].external_data->synx_obj);
	}
}
static ssize_t synx_table_read(struct file *file,
@@ -51,7 +50,6 @@ static ssize_t synx_table_read(struct file *file,
	char *dbuf, *cur, *end;

	int i = 0;
	int state = SYNX_STATE_INVALID;
	ssize_t len = 0;
	s32 index;

@@ -64,17 +62,15 @@ static ssize_t synx_table_read(struct file *file,
		cur += scnprintf(cur, end - cur, "|   Name   |");
	if (columns & BOUND_COLUMN)
		cur += scnprintf(cur, end - cur, "|   Bound   |");
	if (columns & STATE_COLUMN)
		cur += scnprintf(cur, end - cur, "|  Status  |");
	cur += scnprintf(cur, end - cur, "\n");
	for (i = 0; i < SYNX_MAX_OBJS; i++) {
	for (i = 1; i < SYNX_MAX_OBJS; i++) {
		row = &dev->synx_table[i];

		index = row->index;
		mutex_lock(&dev->row_locks[index]);
		if (!row->index) {
			mutex_unlock(&dev->row_locks[index]);
			pr_warn("synx obj at %d invalid\n", index);
			pr_debug("synx obj at %d invalid\n", index);
			continue;
		}

@@ -84,11 +80,6 @@ static ssize_t synx_table_read(struct file *file,
		if (columns & BOUND_COLUMN)
			cur += scnprintf(cur, end - cur,
				"|%11d|", row->num_bound_synxs);
		if (columns & STATE_COLUMN) {
			state = synx_status(row);
			cur += scnprintf(cur, end - cur,
				"|%10d|", state);
		}
		if ((columns & BOUND_COLUMN) &&
			(row->num_bound_synxs > 0)) {
			cur += scnprintf(
+3 −2
Original line number Diff line number Diff line
@@ -252,6 +252,7 @@ int synx_deinit_object(struct synx_table_row *row)
		}
	}


	memset(row, 0, sizeof(*row));
	clear_bit(index, synx_dev->bitmap);

@@ -592,7 +593,7 @@ void *synx_from_handle(s32 synx_obj)
		return NULL;
	}

	base = current->tgid << 16;
	base = (current->tgid << 16) & 0x7FFFFFFF;

	if ((base >> 16) != (synx_obj >> 16)) {
		pr_err("current client: %d, base: %d, synx_obj: 0x%x\n",
@@ -619,7 +620,7 @@ void synx_release_handle(void *pObj)

s32 synx_create_handle(void *pObj)
{
	s32 base = current->tgid << 16;
	s32 base = (current->tgid << 16) & 0x7FFFFFFF;
	s32 id;
	struct synx_handle_entry *entry;
	unsigned long flags;
+3 −3
Original line number Diff line number Diff line
@@ -529,9 +529,9 @@ int ax_check_ether_addr(struct ax_device *axdev);
int ax_get_mac_pass(struct ax_device *axdev, u8 *mac);
void ax_set_tx_qlen(struct ax_device *dev);

inline void *__rx_buf_align(void *data);
inline void *__tx_buf_align(void *data, u8 tx_align_len);
inline struct net_device_stats *ax_get_stats(struct net_device *dev);
void *__rx_buf_align(void *data);
void *__tx_buf_align(void *data, u8 tx_align_len);
struct net_device_stats *ax_get_stats(struct net_device *dev);
void ax_write_bulk_callback(struct urb *urb);

void ax_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info);
Loading