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

Commit 4b62196b authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

core_ctl: Increase MAX_CPUS_PER_CLUSTER to 6



It is possible to have more than 4 CPUs in a cluster. Increase
the MAX_CPUS_PER_CLUSTER to 6.

Change-Id: Ib3e8fa7d309db7a2105fd5d640fe40c23eb868c6
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent fd8f40e6
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -23,7 +23,7 @@


#include <trace/events/sched.h>
#include <trace/events/sched.h>


#define MAX_CPUS_PER_CLUSTER 4
#define MAX_CPUS_PER_CLUSTER 6
#define MAX_CLUSTERS 2
#define MAX_CLUSTERS 2


struct cluster_data {
struct cluster_data {
@@ -166,7 +166,9 @@ static ssize_t store_busy_up_thres(struct cluster_data *state,
	unsigned int val[MAX_CPUS_PER_CLUSTER];
	unsigned int val[MAX_CPUS_PER_CLUSTER];
	int ret, i;
	int ret, i;


	ret = sscanf(buf, "%u %u %u %u\n", &val[0], &val[1], &val[2], &val[3]);
	ret = sscanf(buf, "%u %u %u %u %u %u\n",
			&val[0], &val[1], &val[2], &val[3],
			&val[4], &val[5]);
	if (ret != 1 && ret != state->num_cpus)
	if (ret != 1 && ret != state->num_cpus)
		return -EINVAL;
		return -EINVAL;


@@ -199,7 +201,9 @@ static ssize_t store_busy_down_thres(struct cluster_data *state,
	unsigned int val[MAX_CPUS_PER_CLUSTER];
	unsigned int val[MAX_CPUS_PER_CLUSTER];
	int ret, i;
	int ret, i;


	ret = sscanf(buf, "%u %u %u %u\n", &val[0], &val[1], &val[2], &val[3]);
	ret = sscanf(buf, "%u %u %u %u %u %u\n",
			&val[0], &val[1], &val[2], &val[3],
			&val[4], &val[5]);
	if (ret != 1 && ret != state->num_cpus)
	if (ret != 1 && ret != state->num_cpus)
		return -EINVAL;
		return -EINVAL;


@@ -308,7 +312,9 @@ static ssize_t store_not_preferred(struct cluster_data *state,
	unsigned long flags;
	unsigned long flags;
	int ret;
	int ret;


	ret = sscanf(buf, "%u %u %u %u\n", &val[0], &val[1], &val[2], &val[3]);
	ret = sscanf(buf, "%u %u %u %u %u %u\n",
			&val[0], &val[1], &val[2], &val[3],
			&val[4], &val[5]);
	if (ret != state->num_cpus)
	if (ret != state->num_cpus)
		return -EINVAL;
		return -EINVAL;