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

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

Merge 33710784 on remote branch

Change-Id: I8a1aceb0966078ffe806cd5a034aad718dd17975
parents 87e31822 33710784
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ struct insn_emulation {
static LIST_HEAD(insn_emulation);
static int nr_insn_emulated __initdata;
static DEFINE_RAW_SPINLOCK(insn_emulation_lock);
static DEFINE_MUTEX(insn_emulation_mutex);

static void register_emulation_hooks(struct insn_emulation_ops *ops)
{
@@ -210,10 +211,10 @@ static int emulation_proc_handler(struct ctl_table *table, int write,
				  loff_t *ppos)
{
	int ret = 0;
	struct insn_emulation *insn = (struct insn_emulation *) table->data;
	struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode);
	enum insn_emulation_mode prev_mode = insn->current_mode;

	table->data = &insn->current_mode;
	mutex_lock(&insn_emulation_mutex);
	ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);

	if (ret || !write || prev_mode == insn->current_mode)
@@ -226,7 +227,7 @@ static int emulation_proc_handler(struct ctl_table *table, int write,
		update_insn_emulation_mode(insn, INSN_UNDEF);
	}
ret:
	table->data = insn;
	mutex_unlock(&insn_emulation_mutex);
	return ret;
}

@@ -250,7 +251,7 @@ static void __init register_insn_emulation_sysctl(void)
		sysctl->maxlen = sizeof(int);

		sysctl->procname = insn->ops->name;
		sysctl->data = insn;
		sysctl->data = &insn->current_mode;
		sysctl->extra1 = &insn->min;
		sysctl->extra2 = &insn->max;
		sysctl->proc_handler = emulation_proc_handler;
+14 −4
Original line number Diff line number Diff line
@@ -31,6 +31,16 @@
#include <asm/cputype.h>
#include <asm/topology.h>

/*
 * This function returns the logic cpu number of the node.
 * There are basically three kinds of return values:
 * (1) logic cpu number which is > 0.
 * (2) -ENODEV when the device tree(DT) node is valid and found in the DT but
 * there is no possible logical CPU in the kernel to match. This happens
 * when CONFIG_NR_CPUS is configure to be smaller than the number of
 * CPU nodes in DT. We need to just ignore this case.
 * (3) -1 if the node does not exist in the device tree
 */
static int __init get_cpu_for_node(struct device_node *node)
{
	struct device_node *cpu_node;
@@ -44,8 +54,8 @@ static int __init get_cpu_for_node(struct device_node *node)
	if (cpu >= 0)
		topology_parse_cpu_capacity(cpu_node, cpu);
	else
		pr_crit("Unable to find CPU node for %pOF\n", cpu_node);

		pr_info("CPU node for %pOF exist but the possible cpu range is :%*pbl\n",
			cpu_node, cpumask_pr_args(cpu_possible_mask));
	of_node_put(cpu_node);
	return cpu;
}
@@ -69,7 +79,7 @@ static int __init parse_core(struct device_node *core, int package_id,
				cpu_topology[cpu].package_id = package_id;
				cpu_topology[cpu].core_id = core_id;
				cpu_topology[cpu].thread_id = i;
			} else {
			} else if (cpu != -ENODEV) {
				pr_err("%pOF: Can't get CPU for thread\n",
				       t);
				of_node_put(t);
@@ -90,7 +100,7 @@ static int __init parse_core(struct device_node *core, int package_id,

		cpu_topology[cpu].package_id = package_id;
		cpu_topology[cpu].core_id = core_id;
	} else if (leaf) {
	} else if (leaf && cpu != -ENODEV) {
		pr_err("%pOF: Can't get CPU for leaf core\n", core);
		return -EINVAL;
	}
+12 −0
Original line number Diff line number Diff line
@@ -1948,6 +1948,18 @@ static int binder_inc_ref_for_node(struct binder_proc *proc,
	}
	ret = binder_inc_ref_olocked(ref, strong, target_list);
	*rdata = ref->data;
	if (ret && ref == new_ref) {
		/*
		 * Cleanup the failed reference here as the target
		 * could now be dead and have already released its
		 * references by now. Calling on the new reference
		 * with strong=0 and a tmp_refs will not decrement
		 * the node. The new_ref gets kfree'd below.
		 */
		binder_cleanup_ref_olocked(new_ref);
		ref = NULL;
	}

	binder_proc_unlock(proc);
	if (new_ref && ref != new_ref)
		/*
+1 −0
Original line number Diff line number Diff line
@@ -448,6 +448,7 @@ static int binderfs_binder_ctl_create(struct super_block *sb)
	inode->i_uid = info->root_uid;
	inode->i_gid = info->root_gid;

	refcount_set(&device->ref, 1);
	device->binderfs_inode = inode;
	device->miscdev.minor = minor;

+12 −2
Original line number Diff line number Diff line
@@ -506,7 +506,7 @@ static bool clk_rcg2_current_config(struct clk_rcg2 *rcg,

static int __clk_rcg2_configure(struct clk_rcg2 *rcg, const struct freq_tbl *f)
{
	u32 cfg, mask;
	u32 cfg, mask, d_val, not2d_val, n_minus_m;
	struct clk_hw *hw = &rcg->clkr.hw;
	int ret, index = qcom_find_src_index(hw, rcg->parent_map, f->src);

@@ -525,8 +525,17 @@ static int __clk_rcg2_configure(struct clk_rcg2 *rcg, const struct freq_tbl *f)
		if (ret)
			return ret;

		/* Calculate 2d value */
		d_val = f->n;

		n_minus_m = f->n - f->m;
		n_minus_m *= 2;

		d_val = clamp_t(u32, d_val, f->m, n_minus_m);
		not2d_val = ~d_val & mask;

		ret = regmap_update_bits(rcg->clkr.regmap,
				rcg->cmd_rcgr + D_REG, mask, ~f->n);
				rcg->cmd_rcgr + D_REG, mask, not2d_val);
		if (ret)
			return ret;
	}
@@ -1102,6 +1111,7 @@ static const struct frac_entry frac_table_pixel[] = {
	{ 2, 9 },
	{ 4, 9 },
	{ 1, 1 },
	{ 2, 3 },
	{ }
};

Loading