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

Commit b19ad3b9 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'pm-cpuidle'

* pm-cpuidle:
  cpuidle: Add a kerneldoc comment to cpuidle_use_deepest_state()
  cpuidle: fix improper return value on error
  intel_idle: Convert to hotplug state machine
  intel_idle: Remove superfluous SMP fuction call
  MAINTAINERS: Add Jacob Pan as a new intel_idle maintainer
  MAINTAINERS: Add bug tracking system location entries for cpuidle
  x86/intel_idle: Add Knights Mill CPUID
  x86/intel_idle: Add CPU model 0x4a (Atom Z34xx series)
  thermal/intel_powerclamp: stop sched tick in forced idle
  thermal/intel_powerclamp: Convert to CPU hotplug state
  thermal/intel_powerclamp: Convert the kthread to kthread worker API
  thermal/intel_powerclamp: Remove duplicated code that starts the kthread
  sched/idle: Add support for tasks that inject idle
  cpuidle: Allow enforcing deepest idle state selection
  cpuidle/powernv: staticise powernv_idle_driver
  cpuidle: dt: assign ->enter_freeze to same as ->enter callback function
  cpuidle: governors: Remove remaining old module code
parents fecc8c0e 404ea9f1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3389,6 +3389,7 @@ M: Daniel Lezcano <daniel.lezcano@linaro.org>
L:	linux-pm@vger.kernel.org
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
B:	https://bugzilla.kernel.org
F:	drivers/cpuidle/*
F:	include/linux/cpuidle.h

@@ -6298,9 +6299,11 @@ S: Maintained
F:	drivers/platform/x86/intel-vbtn.c

INTEL IDLE DRIVER
M:	Jacob Pan <jacob.jun.pan@linux.intel.com>
M:	Len Brown <lenb@kernel.org>
L:	linux-pm@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git
B:	https://bugzilla.kernel.org
S:	Supported
F:	drivers/idle/intel_idle.c

+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

#define POWERNV_THRESHOLD_LATENCY_NS 200000

struct cpuidle_driver powernv_idle_driver = {
static struct cpuidle_driver powernv_idle_driver = {
	.name             = "powernv_idle",
	.owner            = THIS_MODULE,
};
+18 −1
Original line number Diff line number Diff line
@@ -97,7 +97,23 @@ static int find_deepest_state(struct cpuidle_driver *drv,
	return ret;
}

#ifdef CONFIG_SUSPEND
/**
 * cpuidle_use_deepest_state - Set/clear governor override flag.
 * @enable: New value of the flag.
 *
 * Set/unset the current CPU to use the deepest idle state (override governors
 * going forward if set).
 */
void cpuidle_use_deepest_state(bool enable)
{
	struct cpuidle_device *dev;

	preempt_disable();
	dev = cpuidle_get_device();
	dev->use_deepest_state = enable;
	preempt_enable();
}

/**
 * cpuidle_find_deepest_state - Find the deepest available idle state.
 * @drv: cpuidle driver for the given CPU.
@@ -109,6 +125,7 @@ int cpuidle_find_deepest_state(struct cpuidle_driver *drv,
	return find_deepest_state(drv, dev, UINT_MAX, 0, false);
}

#ifdef CONFIG_SUSPEND
static void enter_freeze_proper(struct cpuidle_driver *drv,
				struct cpuidle_device *dev, int index)
{
+6 −0
Original line number Diff line number Diff line
@@ -38,6 +38,12 @@ static int init_state_node(struct cpuidle_state *idle_state,
	 * state enter function.
	 */
	idle_state->enter = match_id->data;
	/*
	 * Since this is not a "coupled" state, it's safe to assume interrupts
	 * won't be enabled when it exits allowing the tick to be frozen
	 * safely. So enter() can be also enter_freeze() callback.
	 */
	idle_state->enter_freeze = match_id->data;

	err = of_property_read_u32(state_node, "wakeup-latency-us",
				   &idle_state->exit_latency);
+0 −4
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@
 */

#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/cpuidle.h>

#include "cpuidle.h"
@@ -53,14 +52,11 @@ int cpuidle_switch_governor(struct cpuidle_governor *gov)
	if (cpuidle_curr_governor) {
		list_for_each_entry(dev, &cpuidle_detected_devices, device_list)
			cpuidle_disable_device(dev);
		module_put(cpuidle_curr_governor->owner);
	}

	cpuidle_curr_governor = gov;

	if (gov) {
		if (!try_module_get(cpuidle_curr_governor->owner))
			return -EINVAL;
		list_for_each_entry(dev, &cpuidle_detected_devices, device_list)
			cpuidle_enable_device(dev);
		cpuidle_install_idle_handler();
Loading