aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-04-23 04:54:31 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-23 07:45:22 -0400
commit554c06ba3ee29cf453fca17e9e61120b75aa476d (patch)
tree05633b02fbfd86872b92061d9b5c6fb38c0f6f8c
parent3dcb9f1b17879534c80ccbf62fd13156f83ef799 (diff)
cpuidle: remove en_core_tk_irqen flag
The en_core_tk_irqen flag is set in all the cpuidle driver which means it is not necessary to specify this flag. Remove the flag and the code related to it. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Kevin Hilman <khilman@linaro.org> # for mach-omap2/* Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--arch/arm/mach-at91/cpuidle.c1
-rw-r--r--arch/arm/mach-davinci/cpuidle.c1
-rw-r--r--arch/arm/mach-exynos/cpuidle.c1
-rw-r--r--arch/arm/mach-imx/cpuidle-imx6q.c1
-rw-r--r--arch/arm/mach-imx/pm-imx5.c1
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c1
-rw-r--r--arch/arm/mach-omap2/cpuidle44xx.c1
-rw-r--r--arch/arm/mach-s3c64xx/cpuidle.c1
-rw-r--r--arch/arm/mach-shmobile/cpuidle.c1
-rw-r--r--arch/arm/mach-shmobile/pm-sh7372.c1
-rw-r--r--arch/arm/mach-tegra/cpuidle-tegra114.c1
-rw-r--r--arch/arm/mach-tegra/cpuidle-tegra20.c1
-rw-r--r--arch/arm/mach-tegra/cpuidle-tegra30.c1
-rw-r--r--arch/arm/mach-ux500/cpuidle.c1
-rw-r--r--arch/powerpc/platforms/pseries/processor_idle.c1
-rw-r--r--arch/sh/kernel/cpu/shmobile/cpuidle.c1
-rw-r--r--arch/x86/kernel/apm_32.c1
-rw-r--r--drivers/acpi/processor_idle.c1
-rw-r--r--drivers/cpuidle/cpuidle-calxeda.c1
-rw-r--r--drivers/cpuidle/cpuidle-kirkwood.c1
-rw-r--r--drivers/cpuidle/cpuidle.c72
-rw-r--r--drivers/idle/intel_idle.c1
-rw-r--r--include/linux/cpuidle.h11
23 files changed, 18 insertions, 86 deletions
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c
index 0c6381516a5a..0130df7f0524 100644
--- a/arch/arm/mach-at91/cpuidle.c
+++ b/arch/arm/mach-at91/cpuidle.c
@@ -47,7 +47,6 @@ static int at91_enter_idle(struct cpuidle_device *dev,
47static struct cpuidle_driver at91_idle_driver = { 47static struct cpuidle_driver at91_idle_driver = {
48 .name = "at91_idle", 48 .name = "at91_idle",
49 .owner = THIS_MODULE, 49 .owner = THIS_MODULE,
50 .en_core_tk_irqen = 1,
51 .states[0] = ARM_CPUIDLE_WFI_STATE, 50 .states[0] = ARM_CPUIDLE_WFI_STATE,
52 .states[1] = { 51 .states[1] = {
53 .enter = at91_enter_idle, 52 .enter = at91_enter_idle,
diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c
index 22d6d4acc8d9..c2887c57c899 100644
--- a/arch/arm/mach-davinci/cpuidle.c
+++ b/arch/arm/mach-davinci/cpuidle.c
@@ -62,7 +62,6 @@ static int davinci_enter_idle(struct cpuidle_device *dev,
62static struct cpuidle_driver davinci_idle_driver = { 62static struct cpuidle_driver davinci_idle_driver = {
63 .name = "cpuidle-davinci", 63 .name = "cpuidle-davinci",
64 .owner = THIS_MODULE, 64 .owner = THIS_MODULE,
65 .en_core_tk_irqen = 1,
66 .states[0] = ARM_CPUIDLE_WFI_STATE, 65 .states[0] = ARM_CPUIDLE_WFI_STATE,
67 .states[1] = { 66 .states[1] = {
68 .enter = davinci_enter_idle, 67 .enter = davinci_enter_idle,
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index fcfe0251aa3e..498a7a23e260 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -58,7 +58,6 @@ static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);
58static struct cpuidle_driver exynos4_idle_driver = { 58static struct cpuidle_driver exynos4_idle_driver = {
59 .name = "exynos4_idle", 59 .name = "exynos4_idle",
60 .owner = THIS_MODULE, 60 .owner = THIS_MODULE,
61 .en_core_tk_irqen = 1,
62}; 61};
63 62
64/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ 63/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c
index a783a6314b4f..e2739adf093a 100644
--- a/arch/arm/mach-imx/cpuidle-imx6q.c
+++ b/arch/arm/mach-imx/cpuidle-imx6q.c
@@ -45,7 +45,6 @@ done:
45static struct cpuidle_driver imx6q_cpuidle_driver = { 45static struct cpuidle_driver imx6q_cpuidle_driver = {
46 .name = "imx6q_cpuidle", 46 .name = "imx6q_cpuidle",
47 .owner = THIS_MODULE, 47 .owner = THIS_MODULE,
48 .en_core_tk_irqen = 1,
49 .states = { 48 .states = {
50 /* WFI */ 49 /* WFI */
51 ARM_CPUIDLE_WFI_STATE, 50 ARM_CPUIDLE_WFI_STATE,
diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c
index f67fd7ee8127..4b52b3e028ab 100644
--- a/arch/arm/mach-imx/pm-imx5.c
+++ b/arch/arm/mach-imx/pm-imx5.c
@@ -164,7 +164,6 @@ static int imx5_cpuidle_enter(struct cpuidle_device *dev,
164static struct cpuidle_driver imx5_cpuidle_driver = { 164static struct cpuidle_driver imx5_cpuidle_driver = {
165 .name = "imx5_cpuidle", 165 .name = "imx5_cpuidle",
166 .owner = THIS_MODULE, 166 .owner = THIS_MODULE,
167 .en_core_tk_irqen = 1,
168 .states[0] = { 167 .states[0] = {
169 .enter = imx5_cpuidle_enter, 168 .enter = imx5_cpuidle_enter,
170 .exit_latency = 2, 169 .exit_latency = 2,
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 0ee39a8b1763..20785b2b0ec8 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -264,7 +264,6 @@ static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
264static struct cpuidle_driver omap3_idle_driver = { 264static struct cpuidle_driver omap3_idle_driver = {
265 .name = "omap3_idle", 265 .name = "omap3_idle",
266 .owner = THIS_MODULE, 266 .owner = THIS_MODULE,
267 .en_core_tk_irqen = 1,
268 .states = { 267 .states = {
269 { 268 {
270 .enter = omap3_enter_idle_bm, 269 .enter = omap3_enter_idle_bm,
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index 8a0e43c69b0b..d1bfb21feb74 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -164,7 +164,6 @@ static DEFINE_PER_CPU(struct cpuidle_device, omap_idle_dev);
164static struct cpuidle_driver omap4_idle_driver = { 164static struct cpuidle_driver omap4_idle_driver = {
165 .name = "omap4_idle", 165 .name = "omap4_idle",
166 .owner = THIS_MODULE, 166 .owner = THIS_MODULE,
167 .en_core_tk_irqen = 1,
168 .states = { 167 .states = {
169 { 168 {
170 /* C1 - CPU0 ON + CPU1 ON + MPU ON */ 169 /* C1 - CPU0 ON + CPU1 ON + MPU ON */
diff --git a/arch/arm/mach-s3c64xx/cpuidle.c b/arch/arm/mach-s3c64xx/cpuidle.c
index ead5fab0dbb5..852ff16189f7 100644
--- a/arch/arm/mach-s3c64xx/cpuidle.c
+++ b/arch/arm/mach-s3c64xx/cpuidle.c
@@ -45,7 +45,6 @@ static DEFINE_PER_CPU(struct cpuidle_device, s3c64xx_cpuidle_device);
45static struct cpuidle_driver s3c64xx_cpuidle_driver = { 45static struct cpuidle_driver s3c64xx_cpuidle_driver = {
46 .name = "s3c64xx_cpuidle", 46 .name = "s3c64xx_cpuidle",
47 .owner = THIS_MODULE, 47 .owner = THIS_MODULE,
48 .en_core_tk_irqen = 1,
49 .states = { 48 .states = {
50 { 49 {
51 .enter = s3c64xx_enter_idle, 50 .enter = s3c64xx_enter_idle,
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index c872ae8c1cb9..d671ae90c7a7 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -20,7 +20,6 @@ static struct cpuidle_device shmobile_cpuidle_dev;
20static struct cpuidle_driver shmobile_cpuidle_default_driver = { 20static struct cpuidle_driver shmobile_cpuidle_default_driver = {
21 .name = "shmobile_cpuidle", 21 .name = "shmobile_cpuidle",
22 .owner = THIS_MODULE, 22 .owner = THIS_MODULE,
23 .en_core_tk_irqen = 1,
24 .states[0] = ARM_CPUIDLE_WFI_STATE, 23 .states[0] = ARM_CPUIDLE_WFI_STATE,
25 .safe_state_index = 0, /* C1 */ 24 .safe_state_index = 0, /* C1 */
26 .state_count = 1, 25 .state_count = 1,
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
index fbef7b933c1d..dec9293bb90d 100644
--- a/arch/arm/mach-shmobile/pm-sh7372.c
+++ b/arch/arm/mach-shmobile/pm-sh7372.c
@@ -410,7 +410,6 @@ static int sh7372_enter_a4s(struct cpuidle_device *dev,
410static struct cpuidle_driver sh7372_cpuidle_driver = { 410static struct cpuidle_driver sh7372_cpuidle_driver = {
411 .name = "sh7372_cpuidle", 411 .name = "sh7372_cpuidle",
412 .owner = THIS_MODULE, 412 .owner = THIS_MODULE,
413 .en_core_tk_irqen = 1,
414 .state_count = 5, 413 .state_count = 5,
415 .safe_state_index = 0, /* C1 */ 414 .safe_state_index = 0, /* C1 */
416 .states[0] = ARM_CPUIDLE_WFI_STATE, 415 .states[0] = ARM_CPUIDLE_WFI_STATE,
diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c
index c527cff47ee0..c5fadf9dd900 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra114.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra114.c
@@ -23,7 +23,6 @@
23static struct cpuidle_driver tegra_idle_driver = { 23static struct cpuidle_driver tegra_idle_driver = {
24 .name = "tegra_idle", 24 .name = "tegra_idle",
25 .owner = THIS_MODULE, 25 .owner = THIS_MODULE,
26 .en_core_tk_irqen = 1,
27 .state_count = 1, 26 .state_count = 1,
28 .states = { 27 .states = {
29 [0] = ARM_CPUIDLE_WFI_STATE_PWR(600), 28 [0] = ARM_CPUIDLE_WFI_STATE_PWR(600),
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
index b94d76a0e0c0..f1f6ac40d714 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -51,7 +51,6 @@ static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev,
51static struct cpuidle_driver tegra_idle_driver = { 51static struct cpuidle_driver tegra_idle_driver = {
52 .name = "tegra_idle", 52 .name = "tegra_idle",
53 .owner = THIS_MODULE, 53 .owner = THIS_MODULE,
54 .en_core_tk_irqen = 1,
55 .states = { 54 .states = {
56 ARM_CPUIDLE_WFI_STATE_PWR(600), 55 ARM_CPUIDLE_WFI_STATE_PWR(600),
57#ifdef CONFIG_PM_SLEEP 56#ifdef CONFIG_PM_SLEEP
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c
index c4e01fe0fde4..f6a0c7291c35 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra30.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra30.c
@@ -43,7 +43,6 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev,
43static struct cpuidle_driver tegra_idle_driver = { 43static struct cpuidle_driver tegra_idle_driver = {
44 .name = "tegra_idle", 44 .name = "tegra_idle",
45 .owner = THIS_MODULE, 45 .owner = THIS_MODULE,
46 .en_core_tk_irqen = 1,
47#ifdef CONFIG_PM_SLEEP 46#ifdef CONFIG_PM_SLEEP
48 .state_count = 2, 47 .state_count = 2,
49#else 48#else
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c
index 1b16d9ebecda..c29c1bf5ff8b 100644
--- a/arch/arm/mach-ux500/cpuidle.c
+++ b/arch/arm/mach-ux500/cpuidle.c
@@ -94,7 +94,6 @@ out:
94static struct cpuidle_driver ux500_idle_driver = { 94static struct cpuidle_driver ux500_idle_driver = {
95 .name = "ux500_idle", 95 .name = "ux500_idle",
96 .owner = THIS_MODULE, 96 .owner = THIS_MODULE,
97 .en_core_tk_irqen = 1,
98 .states = { 97 .states = {
99 ARM_CPUIDLE_WFI_STATE, 98 ARM_CPUIDLE_WFI_STATE,
100 { 99 {
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
index a197120e169a..4644efa06941 100644
--- a/arch/powerpc/platforms/pseries/processor_idle.c
+++ b/arch/powerpc/platforms/pseries/processor_idle.c
@@ -25,7 +25,6 @@
25struct cpuidle_driver pseries_idle_driver = { 25struct cpuidle_driver pseries_idle_driver = {
26 .name = "pseries_idle", 26 .name = "pseries_idle",
27 .owner = THIS_MODULE, 27 .owner = THIS_MODULE,
28 .en_core_tk_irqen = 1,
29}; 28};
30 29
31#define MAX_IDLE_STATE_COUNT 2 30#define MAX_IDLE_STATE_COUNT 2
diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
index ea6ab0278490..fdfe57f42b8c 100644
--- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
+++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
@@ -55,7 +55,6 @@ static struct cpuidle_device cpuidle_dev;
55static struct cpuidle_driver cpuidle_driver = { 55static struct cpuidle_driver cpuidle_driver = {
56 .name = "sh_idle", 56 .name = "sh_idle",
57 .owner = THIS_MODULE, 57 .owner = THIS_MODULE,
58 .en_core_tk_irqen = 1,
59 .states = { 58 .states = {
60 { 59 {
61 .exit_latency = 1, 60 .exit_latency = 1,
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 66b5faffe14a..53a4e2744846 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -373,7 +373,6 @@ static int apm_cpu_idle(struct cpuidle_device *dev,
373static struct cpuidle_driver apm_idle_driver = { 373static struct cpuidle_driver apm_idle_driver = {
374 .name = "apm_idle", 374 .name = "apm_idle",
375 .owner = THIS_MODULE, 375 .owner = THIS_MODULE,
376 .en_core_tk_irqen = 1,
377 .states = { 376 .states = {
378 { /* entry 0 is for polling */ }, 377 { /* entry 0 is for polling */ },
379 { /* entry 1 is for APM idle */ 378 { /* entry 1 is for APM idle */
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index ee255c60bdac..f0df2c9434d2 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -918,7 +918,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
918struct cpuidle_driver acpi_idle_driver = { 918struct cpuidle_driver acpi_idle_driver = {
919 .name = "acpi_idle", 919 .name = "acpi_idle",
920 .owner = THIS_MODULE, 920 .owner = THIS_MODULE,
921 .en_core_tk_irqen = 1,
922}; 921};
923 922
924/** 923/**
diff --git a/drivers/cpuidle/cpuidle-calxeda.c b/drivers/cpuidle/cpuidle-calxeda.c
index e1aab38c5a8d..a3b56f5d33bd 100644
--- a/drivers/cpuidle/cpuidle-calxeda.c
+++ b/drivers/cpuidle/cpuidle-calxeda.c
@@ -100,7 +100,6 @@ static void calxeda_idle_cpuidle_devices_uninit(void)
100 100
101static struct cpuidle_driver calxeda_idle_driver = { 101static struct cpuidle_driver calxeda_idle_driver = {
102 .name = "calxeda_idle", 102 .name = "calxeda_idle",
103 .en_core_tk_irqen = 1,
104 .states = { 103 .states = {
105 ARM_CPUIDLE_WFI_STATE, 104 ARM_CPUIDLE_WFI_STATE,
106 { 105 {
diff --git a/drivers/cpuidle/cpuidle-kirkwood.c b/drivers/cpuidle/cpuidle-kirkwood.c
index 53aad7324965..6f3152436983 100644
--- a/drivers/cpuidle/cpuidle-kirkwood.c
+++ b/drivers/cpuidle/cpuidle-kirkwood.c
@@ -41,7 +41,6 @@ static int kirkwood_enter_idle(struct cpuidle_device *dev,
41static struct cpuidle_driver kirkwood_idle_driver = { 41static struct cpuidle_driver kirkwood_idle_driver = {
42 .name = "kirkwood_idle", 42 .name = "kirkwood_idle",
43 .owner = THIS_MODULE, 43 .owner = THIS_MODULE,
44 .en_core_tk_irqen = 1,
45 .states[0] = ARM_CPUIDLE_WFI_STATE, 44 .states[0] = ARM_CPUIDLE_WFI_STATE,
46 .states[1] = { 45 .states[1] = {
47 .enter = kirkwood_enter_idle, 46 .enter = kirkwood_enter_idle,
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index c50037029184..0da795b9dbbf 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -43,24 +43,6 @@ void disable_cpuidle(void)
43 43
44static int __cpuidle_register_device(struct cpuidle_device *dev); 44static int __cpuidle_register_device(struct cpuidle_device *dev);
45 45
46static inline int cpuidle_enter(struct cpuidle_device *dev,
47 struct cpuidle_driver *drv, int index)
48{
49 struct cpuidle_state *target_state = &drv->states[index];
50 return target_state->enter(dev, drv, index);
51}
52
53static inline int cpuidle_enter_tk(struct cpuidle_device *dev,
54 struct cpuidle_driver *drv, int index)
55{
56 return cpuidle_wrap_enter(dev, drv, index, cpuidle_enter);
57}
58
59typedef int (*cpuidle_enter_t)(struct cpuidle_device *dev,
60 struct cpuidle_driver *drv, int index);
61
62static cpuidle_enter_t cpuidle_enter_ops;
63
64/** 46/**
65 * cpuidle_play_dead - cpu off-lining 47 * cpuidle_play_dead - cpu off-lining
66 * 48 *
@@ -90,11 +72,27 @@ int cpuidle_play_dead(void)
90 * @next_state: index into drv->states of the state to enter 72 * @next_state: index into drv->states of the state to enter
91 */ 73 */
92int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, 74int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
93 int next_state) 75 int index)
94{ 76{
95 int entered_state; 77 int entered_state;
96 78
97 entered_state = cpuidle_enter_ops(dev, drv, next_state); 79 struct cpuidle_state *target_state = &drv->states[index];
80 ktime_t time_start, time_end;
81 s64 diff;
82
83 time_start = ktime_get();
84
85 entered_state = target_state->enter(dev, drv, index);
86
87 time_end = ktime_get();
88
89 local_irq_enable();
90
91 diff = ktime_to_us(ktime_sub(time_end, time_start));
92 if (diff > INT_MAX)
93 diff = INT_MAX;
94
95 dev->last_residency = (int) diff;
98 96
99 if (entered_state >= 0) { 97 if (entered_state >= 0) {
100 /* Update cpuidle counters */ 98 /* Update cpuidle counters */
@@ -231,37 +229,6 @@ void cpuidle_resume(void)
231 mutex_unlock(&cpuidle_lock); 229 mutex_unlock(&cpuidle_lock);
232} 230}
233 231
234/**
235 * cpuidle_wrap_enter - performs timekeeping and irqen around enter function
236 * @dev: pointer to a valid cpuidle_device object
237 * @drv: pointer to a valid cpuidle_driver object
238 * @index: index of the target cpuidle state.
239 */
240int cpuidle_wrap_enter(struct cpuidle_device *dev,
241 struct cpuidle_driver *drv, int index,
242 int (*enter)(struct cpuidle_device *dev,
243 struct cpuidle_driver *drv, int index))
244{
245 ktime_t time_start, time_end;
246 s64 diff;
247
248 time_start = ktime_get();
249
250 index = enter(dev, drv, index);
251
252 time_end = ktime_get();
253
254 local_irq_enable();
255
256 diff = ktime_to_us(ktime_sub(time_end, time_start));
257 if (diff > INT_MAX)
258 diff = INT_MAX;
259
260 dev->last_residency = (int) diff;
261
262 return index;
263}
264
265#ifdef CONFIG_ARCH_HAS_CPU_RELAX 232#ifdef CONFIG_ARCH_HAS_CPU_RELAX
266static int poll_idle(struct cpuidle_device *dev, 233static int poll_idle(struct cpuidle_device *dev,
267 struct cpuidle_driver *drv, int index) 234 struct cpuidle_driver *drv, int index)
@@ -333,9 +300,6 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
333 return ret; 300 return ret;
334 } 301 }
335 302
336 cpuidle_enter_ops = drv->en_core_tk_irqen ?
337 cpuidle_enter_tk : cpuidle_enter;
338
339 poll_idle_init(drv); 303 poll_idle_init(drv);
340 304
341 ret = cpuidle_add_device_sysfs(dev); 305 ret = cpuidle_add_device_sysfs(dev);
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index c99c31e8a821..6f80c132d4c9 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -71,7 +71,6 @@
71static struct cpuidle_driver intel_idle_driver = { 71static struct cpuidle_driver intel_idle_driver = {
72 .name = "intel_idle", 72 .name = "intel_idle",
73 .owner = THIS_MODULE, 73 .owner = THIS_MODULE,
74 .en_core_tk_irqen = 1,
75}; 74};
76/* intel_idle.max_cstate=0 disables driver */ 75/* intel_idle.max_cstate=0 disables driver */
77static int max_cstate = CPUIDLE_STATE_MAX - 1; 76static int max_cstate = CPUIDLE_STATE_MAX - 1;
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index fc3e5808b7ff..79e38114e5f4 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -105,8 +105,6 @@ struct cpuidle_driver {
105 struct module *owner; 105 struct module *owner;
106 int refcnt; 106 int refcnt;
107 107
108 /* set to 1 to use the core cpuidle time keeping (for all states). */
109 unsigned int en_core_tk_irqen:1;
110 /* used by the cpuidle framework to setup the broadcast timer */ 108 /* used by the cpuidle framework to setup the broadcast timer */
111 unsigned int bctimer:1; 109 unsigned int bctimer:1;
112 /* states array must be ordered in decreasing power consumption */ 110 /* states array must be ordered in decreasing power consumption */
@@ -132,10 +130,6 @@ extern void cpuidle_pause(void);
132extern void cpuidle_resume(void); 130extern void cpuidle_resume(void);
133extern int cpuidle_enable_device(struct cpuidle_device *dev); 131extern int cpuidle_enable_device(struct cpuidle_device *dev);
134extern void cpuidle_disable_device(struct cpuidle_device *dev); 132extern void cpuidle_disable_device(struct cpuidle_device *dev);
135extern int cpuidle_wrap_enter(struct cpuidle_device *dev,
136 struct cpuidle_driver *drv, int index,
137 int (*enter)(struct cpuidle_device *dev,
138 struct cpuidle_driver *drv, int index));
139extern int cpuidle_play_dead(void); 133extern int cpuidle_play_dead(void);
140 134
141extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); 135extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev);
@@ -162,11 +156,6 @@ static inline void cpuidle_resume(void) { }
162static inline int cpuidle_enable_device(struct cpuidle_device *dev) 156static inline int cpuidle_enable_device(struct cpuidle_device *dev)
163{return -ENODEV; } 157{return -ENODEV; }
164static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } 158static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
165static inline int cpuidle_wrap_enter(struct cpuidle_device *dev,
166 struct cpuidle_driver *drv, int index,
167 int (*enter)(struct cpuidle_device *dev,
168 struct cpuidle_driver *drv, int index))
169{ return -ENODEV; }
170static inline int cpuidle_play_dead(void) {return -ENODEV; } 159static inline int cpuidle_play_dead(void) {return -ENODEV; }
171#endif 160#endif
172 161