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

Commit fbfa7b35 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

core_ctl: remove "cpus" sysfs file that prints CPU online status



core_ctl module no longer hotplug the CPUs. Hence remove the
/sys/devices/system/cpu/cpuX/core_ctl/cpus file interface which
pints the online/offline state of all CPUs in the cluster.

The global_state file interface can still be used to know all
the state information about all CPUs. Replace "Active" with
"Isolated" string in this file output. Otherwise we see that
an offline CPU as active.

Change-Id: Id6ffb1c3ddfe85cf34ab670ceea8b53e5b2f60e2
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 088f334c
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,