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

Commit 32c72dfb authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: schedutil: Ignore work_in_progress"

parents 60a2fb6f 5d0b1a79
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@
#include <linux/suspend.h>
#include <linux/syscore_ops.h>
#include <linux/tick.h>
#include <linux/sched/topology.h>

#include <trace/events/power.h>

static LIST_HEAD(cpufreq_policy_list);
@@ -1075,7 +1077,8 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, unsigned int cp
	if (has_target()) {
		ret = cpufreq_start_governor(policy);
		if (ret)
			pr_err("%s: Failed to start governor\n", __func__);
			pr_err("%s: Failed to start governor for CPU%u, policy CPU%u\n",
			       __func__, cpu, policy->cpu);
	}
	up_write(&policy->rwsem);
	return ret;
@@ -2534,7 +2537,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
	hp_online = ret;
	ret = 0;

	pr_debug("driver %s up and running\n", driver_data->name);
	pr_info("driver %s up and running\n", driver_data->name);
	goto out;

err_if_unreg:
@@ -2566,7 +2569,7 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver)
	if (!cpufreq_driver || (driver != cpufreq_driver))
		return -EINVAL;

	pr_debug("unregistering driver %s\n", driver->name);
	pr_info("unregistering driver %s\n", driver->name);

	/* Protect against concurrent cpu hotplug */
	cpus_read_lock();
+4 −6
Original line number Diff line number Diff line
@@ -162,11 +162,9 @@ static void sugov_deferred_update(struct sugov_policy *sg_policy, u64 time,
	if (!sugov_update_next_freq(sg_policy, time, next_freq))
		return;

	if (!sg_policy->work_in_progress) {
	sg_policy->work_in_progress = true;
	irq_work_queue(&sg_policy->irq_work);
}
}

/**
 * get_next_freq - Compute a new frequency for a given cpufreq policy.
@@ -635,14 +633,14 @@ static ssize_t up_rate_limit_us_show(struct gov_attr_set *attr_set, char *buf)
{
	struct sugov_tunables *tunables = to_sugov_tunables(attr_set);

	return sprintf(buf, "%u\n", tunables->up_rate_limit_us);
	return scnprintf(buf, PAGE_SIZE, "%u\n", tunables->up_rate_limit_us);
}

static ssize_t down_rate_limit_us_show(struct gov_attr_set *attr_set, char *buf)
{
	struct sugov_tunables *tunables = to_sugov_tunables(attr_set);

	return sprintf(buf, "%u\n", tunables->down_rate_limit_us);
	return scnprintf(buf, PAGE_SIZE, "%u\n", tunables->down_rate_limit_us);
}

static ssize_t up_rate_limit_us_store(struct gov_attr_set *attr_set,