Commit a7da4813 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'pm-cpuidle'

* pm-cpuidle:
  drivers/cpuidle: make cpuidle-exynos.c explicitly non-modular
  drivers/cpuidle: make cpuidle-ux500.c explicitly non-modular
  drivers/cpuidle: make cpuidle-clps711x.c explicitly non-modular
  cpuidle,menu: smooth out measured_us calculation
  cpuidle,menu: use interactivity_req to disable polling
  cpuidle,x86: increase forced cut-off for polling to 20us
parents 92266e1d 84599238
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/cpuidle.h> #include <linux/cpuidle.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/module.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#define CLPS711X_CPUIDLE_NAME "clps711x-cpuidle" #define CLPS711X_CPUIDLE_NAME "clps711x-cpuidle"
...@@ -56,8 +56,4 @@ static struct platform_driver clps711x_cpuidle_driver = { ...@@ -56,8 +56,4 @@ static struct platform_driver clps711x_cpuidle_driver = {
.name = CLPS711X_CPUIDLE_NAME, .name = CLPS711X_CPUIDLE_NAME,
}, },
}; };
module_platform_driver_probe(clps711x_cpuidle_driver, clps711x_cpuidle_probe); builtin_platform_driver_probe(clps711x_cpuidle_driver, clps711x_cpuidle_probe);
MODULE_AUTHOR("Alexander Shiyan <shc_work@mail.ru>");
MODULE_DESCRIPTION("CLPS711X CPU idle driver");
MODULE_LICENSE("GPL");
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <linux/cpuidle.h> #include <linux/cpuidle.h>
#include <linux/cpu_pm.h> #include <linux/cpu_pm.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/module.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/platform_data/cpuidle-exynos.h> #include <linux/platform_data/cpuidle-exynos.h>
...@@ -142,5 +142,4 @@ static struct platform_driver exynos_cpuidle_driver = { ...@@ -142,5 +142,4 @@ static struct platform_driver exynos_cpuidle_driver = {
.name = "exynos_cpuidle", .name = "exynos_cpuidle",
}, },
}; };
builtin_platform_driver(exynos_cpuidle_driver);
module_platform_driver(exynos_cpuidle_driver);
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/module.h> #include <linux/init.h>
#include <linux/cpuidle.h> #include <linux/cpuidle.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/atomic.h> #include <linux/atomic.h>
...@@ -124,5 +124,4 @@ static struct platform_driver dbx500_cpuidle_plat_driver = { ...@@ -124,5 +124,4 @@ static struct platform_driver dbx500_cpuidle_plat_driver = {
}, },
.probe = dbx500_cpuidle_probe, .probe = dbx500_cpuidle_probe,
}; };
builtin_platform_driver(dbx500_cpuidle_plat_driver);
module_platform_driver(dbx500_cpuidle_plat_driver);
...@@ -330,7 +330,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) ...@@ -330,7 +330,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
* We want to default to C1 (hlt), not to busy polling * We want to default to C1 (hlt), not to busy polling
* unless the timer is happening really really soon. * unless the timer is happening really really soon.
*/ */
if (data->next_timer_us > 5 && if (interactivity_req > 20 &&
!drv->states[CPUIDLE_DRIVER_STATE_START].disabled && !drv->states[CPUIDLE_DRIVER_STATE_START].disabled &&
dev->states_usage[CPUIDLE_DRIVER_STATE_START].disable == 0) dev->states_usage[CPUIDLE_DRIVER_STATE_START].disable == 0)
data->last_state_idx = CPUIDLE_DRIVER_STATE_START; data->last_state_idx = CPUIDLE_DRIVER_STATE_START;
...@@ -404,8 +404,10 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev) ...@@ -404,8 +404,10 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
measured_us = cpuidle_get_last_residency(dev); measured_us = cpuidle_get_last_residency(dev);
/* Deduct exit latency */ /* Deduct exit latency */
if (measured_us > target->exit_latency) if (measured_us > 2 * target->exit_latency)
measured_us -= target->exit_latency; measured_us -= target->exit_latency;
else
measured_us /= 2;
/* Make sure our coefficients do not exceed unity */ /* Make sure our coefficients do not exceed unity */
if (measured_us > data->next_timer_us) if (measured_us > data->next_timer_us)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment