Skip to content

Commit a7da481

Browse files
committed
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
2 parents 92266e1 + 8459923 commit a7da481

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

drivers/cpuidle/cpuidle-clps711x.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <linux/cpuidle.h>
1313
#include <linux/err.h>
1414
#include <linux/io.h>
15-
#include <linux/module.h>
15+
#include <linux/init.h>
1616
#include <linux/platform_device.h>
1717

1818
#define CLPS711X_CPUIDLE_NAME "clps711x-cpuidle"
@@ -56,8 +56,4 @@ static struct platform_driver clps711x_cpuidle_driver = {
5656
.name = CLPS711X_CPUIDLE_NAME,
5757
},
5858
};
59-
module_platform_driver_probe(clps711x_cpuidle_driver, clps711x_cpuidle_probe);
60-
61-
MODULE_AUTHOR("Alexander Shiyan <[email protected]>");
62-
MODULE_DESCRIPTION("CLPS711X CPU idle driver");
63-
MODULE_LICENSE("GPL");
59+
builtin_platform_driver_probe(clps711x_cpuidle_driver, clps711x_cpuidle_probe);

drivers/cpuidle/cpuidle-exynos.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <linux/cpuidle.h>
1515
#include <linux/cpu_pm.h>
1616
#include <linux/export.h>
17-
#include <linux/module.h>
17+
#include <linux/init.h>
1818
#include <linux/platform_device.h>
1919
#include <linux/of.h>
2020
#include <linux/platform_data/cpuidle-exynos.h>
@@ -142,5 +142,4 @@ static struct platform_driver exynos_cpuidle_driver = {
142142
.name = "exynos_cpuidle",
143143
},
144144
};
145-
146-
module_platform_driver(exynos_cpuidle_driver);
145+
builtin_platform_driver(exynos_cpuidle_driver);

drivers/cpuidle/cpuidle-ux500.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* published by the Free Software Foundation.
1010
*/
1111

12-
#include <linux/module.h>
12+
#include <linux/init.h>
1313
#include <linux/cpuidle.h>
1414
#include <linux/spinlock.h>
1515
#include <linux/atomic.h>
@@ -124,5 +124,4 @@ static struct platform_driver dbx500_cpuidle_plat_driver = {
124124
},
125125
.probe = dbx500_cpuidle_probe,
126126
};
127-
128-
module_platform_driver(dbx500_cpuidle_plat_driver);
127+
builtin_platform_driver(dbx500_cpuidle_plat_driver);

drivers/cpuidle/governors/menu.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
330330
* We want to default to C1 (hlt), not to busy polling
331331
* unless the timer is happening really really soon.
332332
*/
333-
if (data->next_timer_us > 5 &&
333+
if (interactivity_req > 20 &&
334334
!drv->states[CPUIDLE_DRIVER_STATE_START].disabled &&
335335
dev->states_usage[CPUIDLE_DRIVER_STATE_START].disable == 0)
336336
data->last_state_idx = CPUIDLE_DRIVER_STATE_START;
@@ -404,8 +404,10 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
404404
measured_us = cpuidle_get_last_residency(dev);
405405

406406
/* Deduct exit latency */
407-
if (measured_us > target->exit_latency)
407+
if (measured_us > 2 * target->exit_latency)
408408
measured_us -= target->exit_latency;
409+
else
410+
measured_us /= 2;
409411

410412
/* Make sure our coefficients do not exceed unity */
411413
if (measured_us > data->next_timer_us)

0 commit comments

Comments
 (0)