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

Commit 2444a624 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "core_ctl: remove "cpus" sysfs file that prints CPU online status" into msm-4.9

parents 3b0d26c5 fbfa7b35
Loading
Loading
Loading
Loading
+2 −20
Original line number Diff line number Diff line
@@ -243,22 +243,6 @@ static ssize_t show_is_big_cluster(const struct cluster_data *state, char *buf)
	return snprintf(buf, PAGE_SIZE, "%u\n", state->is_big_cluster);
}

static ssize_t show_cpus(const struct cluster_data *state, char *buf)
{
	struct cpu_data *c;
	ssize_t count = 0;
	unsigned long flags;

	spin_lock_irqsave(&state_lock, flags);
	list_for_each_entry(c, &state->lru, sib) {
		count += snprintf(buf + count, PAGE_SIZE - count,
				  "CPU%u (%s)\n", c->cpu,
				  cpu_online(c->cpu) ? "Online" : "Offline");
	}
	spin_unlock_irqrestore(&state_lock, flags);
	return count;
}

static ssize_t show_need_cpus(const struct cluster_data *state, char *buf)
{
	return snprintf(buf, PAGE_SIZE, "%u\n", state->need_cpus);
@@ -290,8 +274,8 @@ static ssize_t show_global_state(const struct cluster_data *state, char *buf)
					"\tOnline: %u\n",
					cpu_online(c->cpu));
		count += snprintf(buf + count, PAGE_SIZE - count,
					"\tActive: %u\n",
					!cpu_isolated(c->cpu));
					"\tIsolated: %u\n",
					cpu_isolated(c->cpu));
		count += snprintf(buf + count, PAGE_SIZE - count,
					"\tFirst CPU: %u\n",
						cluster->first_cpu);
@@ -378,7 +362,6 @@ core_ctl_attr_rw(busy_up_thres);
core_ctl_attr_rw(busy_down_thres);
core_ctl_attr_rw(task_thres);
core_ctl_attr_rw(is_big_cluster);
core_ctl_attr_ro(cpus);
core_ctl_attr_ro(need_cpus);
core_ctl_attr_ro(active_cpus);
core_ctl_attr_ro(global_state);
@@ -392,7 +375,6 @@ static struct attribute *default_attrs[] = {
	&busy_down_thres.attr,
	&task_thres.attr,
	&is_big_cluster.attr,
	&cpus.attr,
	&need_cpus.attr,
	&active_cpus.attr,
	&global_state.attr,