All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-03 12:15 ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: rjw
  Cc: linux-pm, patches, linaro-kernel, linux-arm-kernel, linux,
	rnayak, swarren, linux-tegra, horms+renesas, santosh.shilimkar,
	arnd, lenb, nsekhar, josephl, deepthi

The noop functions code is not necessary because the header file is
included in files which are compiled when CONFIG_CPU_IDLE is on.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/include/asm/cpuidle.h |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
index 2fca60a..7367787 100644
--- a/arch/arm/include/asm/cpuidle.h
+++ b/arch/arm/include/asm/cpuidle.h
@@ -1,13 +1,8 @@
 #ifndef __ASM_ARM_CPUIDLE_H
 #define __ASM_ARM_CPUIDLE_H
 
-#ifdef CONFIG_CPU_IDLE
 extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
-		struct cpuidle_driver *drv, int index);
-#else
-static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
-		struct cpuidle_driver *drv, int index) { return -ENODEV; }
-#endif
+				    struct cpuidle_driver *drv, int index);
 
 /* Common ARM WFI state */
 #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-03 12:15 ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

The noop functions code is not necessary because the header file is
included in files which are compiled when CONFIG_CPU_IDLE is on.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/include/asm/cpuidle.h |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
index 2fca60a..7367787 100644
--- a/arch/arm/include/asm/cpuidle.h
+++ b/arch/arm/include/asm/cpuidle.h
@@ -1,13 +1,8 @@
 #ifndef __ASM_ARM_CPUIDLE_H
 #define __ASM_ARM_CPUIDLE_H
 
-#ifdef CONFIG_CPU_IDLE
 extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
-		struct cpuidle_driver *drv, int index);
-#else
-static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
-		struct cpuidle_driver *drv, int index) { return -ENODEV; }
-#endif
+				    struct cpuidle_driver *drv, int index);
 
 /* Common ARM WFI state */
 #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 2/9] ARM: shmobile: pm: fix init sections
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-03 12:15     ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: rjw-KKrjLPT3xs0
  Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA, patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	lenb-DgEjT+Ai2ygdnm+yROfE0A, nsekhar-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Add the __init section for the functions which are called
at init time.

Signed-off-by: Daniel Lezcano <daniel.linaro.org>
Acked-by: Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
---
 arch/arm/mach-shmobile/cpuidle.c   |    4 ++--
 arch/arm/mach-shmobile/pm-sh7372.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index 9e05026..068f9ca 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -36,12 +36,12 @@ static struct cpuidle_driver shmobile_cpuidle_default_driver = {
 
 static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver;
 
-void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv)
+void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv)
 {
 	cpuidle_drv = drv;
 }
 
-int shmobile_cpuidle_init(void)
+int __init shmobile_cpuidle_init(void)
 {
 	struct cpuidle_device *dev = &shmobile_cpuidle_dev;
 
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
index a0826a4..f6b14ca 100644
--- a/arch/arm/mach-shmobile/pm-sh7372.c
+++ b/arch/arm/mach-shmobile/pm-sh7372.c
@@ -450,12 +450,12 @@ static struct cpuidle_driver sh7372_cpuidle_driver = {
 	},
 };
 
-static void sh7372_cpuidle_init(void)
+static void __init sh7372_cpuidle_init(void)
 {
 	shmobile_cpuidle_set_driver(&sh7372_cpuidle_driver);
 }
 #else
-static void sh7372_cpuidle_init(void) {}
+static void __init sh7372_cpuidle_init(void) {}
 #endif
 
 #ifdef CONFIG_SUSPEND
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 2/9] ARM: shmobile: pm: fix init sections
@ 2013-04-03 12:15     ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

Add the __init section for the functions which are called
at init time.

Signed-off-by: Daniel Lezcano <daniel.linaro.org>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/cpuidle.c   |    4 ++--
 arch/arm/mach-shmobile/pm-sh7372.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index 9e05026..068f9ca 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -36,12 +36,12 @@ static struct cpuidle_driver shmobile_cpuidle_default_driver = {
 
 static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver;
 
-void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv)
+void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv)
 {
 	cpuidle_drv = drv;
 }
 
-int shmobile_cpuidle_init(void)
+int __init shmobile_cpuidle_init(void)
 {
 	struct cpuidle_device *dev = &shmobile_cpuidle_dev;
 
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
index a0826a4..f6b14ca 100644
--- a/arch/arm/mach-shmobile/pm-sh7372.c
+++ b/arch/arm/mach-shmobile/pm-sh7372.c
@@ -450,12 +450,12 @@ static struct cpuidle_driver sh7372_cpuidle_driver = {
 	},
 };
 
-static void sh7372_cpuidle_init(void)
+static void __init sh7372_cpuidle_init(void)
 {
 	shmobile_cpuidle_set_driver(&sh7372_cpuidle_driver);
 }
 #else
-static void sh7372_cpuidle_init(void) {}
+static void __init sh7372_cpuidle_init(void) {}
 #endif
 
 #ifdef CONFIG_SUSPEND
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/9] ARM: shmobile: cpuidle: remove useless WFI function
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-03 12:15     ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: rjw-KKrjLPT3xs0
  Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA, patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	lenb-DgEjT+Ai2ygdnm+yROfE0A, nsekhar-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Remove the shmobile_enter_wfi function which is the same as the
common WFI enter function from the arm cpuidle driver defined
with the ARM_CPUIDLE_WFI_STATE macro.

Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Acked-by: Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
---
 arch/arm/mach-shmobile/cpuidle.c |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index 068f9ca..c872ae8 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -16,20 +16,12 @@
 #include <asm/cpuidle.h>
 #include <asm/io.h>
 
-int shmobile_enter_wfi(struct cpuidle_device *dev, struct cpuidle_driver *drv,
-		       int index)
-{
-	cpu_do_idle();
-	return 0;
-}
-
 static struct cpuidle_device shmobile_cpuidle_dev;
 static struct cpuidle_driver shmobile_cpuidle_default_driver = {
 	.name			= "shmobile_cpuidle",
 	.owner			= THIS_MODULE,
 	.en_core_tk_irqen	= 1,
 	.states[0]		= ARM_CPUIDLE_WFI_STATE,
-	.states[0].enter	= shmobile_enter_wfi,
 	.safe_state_index	= 0, /* C1 */
 	.state_count		= 1,
 };
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/9] ARM: shmobile: cpuidle: remove useless WFI function
@ 2013-04-03 12:15     ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the shmobile_enter_wfi function which is the same as the
common WFI enter function from the arm cpuidle driver defined
with the ARM_CPUIDLE_WFI_STATE macro.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/cpuidle.c |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index 068f9ca..c872ae8 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -16,20 +16,12 @@
 #include <asm/cpuidle.h>
 #include <asm/io.h>
 
-int shmobile_enter_wfi(struct cpuidle_device *dev, struct cpuidle_driver *drv,
-		       int index)
-{
-	cpu_do_idle();
-	return 0;
-}
-
 static struct cpuidle_device shmobile_cpuidle_dev;
 static struct cpuidle_driver shmobile_cpuidle_default_driver = {
 	.name			= "shmobile_cpuidle",
 	.owner			= THIS_MODULE,
 	.en_core_tk_irqen	= 1,
 	.states[0]		= ARM_CPUIDLE_WFI_STATE,
-	.states[0].enter	= shmobile_enter_wfi,
 	.safe_state_index	= 0, /* C1 */
 	.state_count		= 1,
 };
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 4/9] ARM: tegra2: cpuidle: change driver initialization
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-03 12:15   ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: rjw
  Cc: linux-pm, patches, linaro-kernel, linux-arm-kernel, linux,
	rnayak, swarren, linux-tegra, horms+renesas, santosh.shilimkar,
	arnd, lenb, nsekhar, josephl, deepthi

Initialize the idle states directly in the driver structure.

That prevents extra structure declaration and memcpy at init time.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Joseph Lo <josephl@nvidia.com>
Acked-by: Joseph Lo <josephl@nvidia.com>
---
 arch/arm/mach-tegra/cpuidle-tegra20.c |   40 ++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
index 825ced4..1ad1a67 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -43,28 +43,32 @@ static atomic_t abort_barrier;
 static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev,
 				    struct cpuidle_driver *drv,
 				    int index);
+#define TEGRA20_MAX_STATES 2
+#else
+#define TEGRA20_MAX_STATES 1
 #endif
 
-static struct cpuidle_state tegra_idle_states[] = {
-	[0] = ARM_CPUIDLE_WFI_STATE_PWR(600),
-#ifdef CONFIG_PM_SLEEP
-	[1] = {
-		.enter			= tegra20_idle_lp2_coupled,
-		.exit_latency		= 5000,
-		.target_residency	= 10000,
-		.power_usage		= 0,
-		.flags			= CPUIDLE_FLAG_TIME_VALID |
-					  CPUIDLE_FLAG_COUPLED,
-		.name			= "powered-down",
-		.desc			= "CPU power gated",
-	},
-#endif
-};
-
 static struct cpuidle_driver tegra_idle_driver = {
 	.name = "tegra_idle",
 	.owner = THIS_MODULE,
 	.en_core_tk_irqen = 1,
+	.states = {
+		ARM_CPUIDLE_WFI_STATE_PWR(600),
+#ifdef CONFIG_PM_SLEEP
+		{
+			.enter            = tegra20_idle_lp2_coupled,
+			.exit_latency     = 5000,
+			.target_residency = 10000,
+			.power_usage      = 0,
+			.flags            = CPUIDLE_FLAG_TIME_VALID |
+			CPUIDLE_FLAG_COUPLED,
+			.name             = "powered-down",
+			.desc             = "CPU power gated",
+		},
+#endif
+	},
+	.state_count = TEGRA20_MAX_STATES,
+	.safe_state_index = 0,
 };
 
 static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
@@ -226,10 +230,6 @@ int __init tegra20_cpuidle_init(void)
 	tegra_tear_down_cpu = tegra20_tear_down_cpu;
 #endif
 
-	drv->state_count = ARRAY_SIZE(tegra_idle_states);
-	memcpy(drv->states, tegra_idle_states,
-			drv->state_count * sizeof(drv->states[0]));
-
 	ret = cpuidle_register_driver(&tegra_idle_driver);
 	if (ret) {
 		pr_err("CPUidle driver registration failed\n");
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 4/9] ARM: tegra2: cpuidle: change driver initialization
@ 2013-04-03 12:15   ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

Initialize the idle states directly in the driver structure.

That prevents extra structure declaration and memcpy at init time.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Joseph Lo <josephl@nvidia.com>
Acked-by: Joseph Lo <josephl@nvidia.com>
---
 arch/arm/mach-tegra/cpuidle-tegra20.c |   40 ++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
index 825ced4..1ad1a67 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -43,28 +43,32 @@ static atomic_t abort_barrier;
 static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev,
 				    struct cpuidle_driver *drv,
 				    int index);
+#define TEGRA20_MAX_STATES 2
+#else
+#define TEGRA20_MAX_STATES 1
 #endif
 
-static struct cpuidle_state tegra_idle_states[] = {
-	[0] = ARM_CPUIDLE_WFI_STATE_PWR(600),
-#ifdef CONFIG_PM_SLEEP
-	[1] = {
-		.enter			= tegra20_idle_lp2_coupled,
-		.exit_latency		= 5000,
-		.target_residency	= 10000,
-		.power_usage		= 0,
-		.flags			= CPUIDLE_FLAG_TIME_VALID |
-					  CPUIDLE_FLAG_COUPLED,
-		.name			= "powered-down",
-		.desc			= "CPU power gated",
-	},
-#endif
-};
-
 static struct cpuidle_driver tegra_idle_driver = {
 	.name = "tegra_idle",
 	.owner = THIS_MODULE,
 	.en_core_tk_irqen = 1,
+	.states = {
+		ARM_CPUIDLE_WFI_STATE_PWR(600),
+#ifdef CONFIG_PM_SLEEP
+		{
+			.enter            = tegra20_idle_lp2_coupled,
+			.exit_latency     = 5000,
+			.target_residency = 10000,
+			.power_usage      = 0,
+			.flags            = CPUIDLE_FLAG_TIME_VALID |
+			CPUIDLE_FLAG_COUPLED,
+			.name             = "powered-down",
+			.desc             = "CPU power gated",
+		},
+#endif
+	},
+	.state_count = TEGRA20_MAX_STATES,
+	.safe_state_index = 0,
 };
 
 static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
@@ -226,10 +230,6 @@ int __init tegra20_cpuidle_init(void)
 	tegra_tear_down_cpu = tegra20_tear_down_cpu;
 #endif
 
-	drv->state_count = ARRAY_SIZE(tegra_idle_states);
-	memcpy(drv->states, tegra_idle_states,
-			drv->state_count * sizeof(drv->states[0]));
-
 	ret = cpuidle_register_driver(&tegra_idle_driver);
 	if (ret) {
 		pr_err("CPUidle driver registration failed\n");
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 5/9] ARM: tegra: cpuidle: remove useless initialization
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-03 12:15   ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: rjw
  Cc: linux-pm, patches, linaro-kernel, linux-arm-kernel, linux,
	rnayak, swarren, linux-tegra, horms+renesas, santosh.shilimkar,
	arnd, lenb, nsekhar, josephl, deepthi

dev->state_count is initialized automatically by cpuidle_register_device.

When drv->state_count is equal to dev->state_count, no need to init this
field, so removing it.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Joseph Lo <josephl@nvidia.com>
Acked-by: Joseph Lo <josephl@nvidia.com>
---
 arch/arm/mach-tegra/cpuidle-tegra114.c |    1 -
 arch/arm/mach-tegra/cpuidle-tegra20.c  |    1 -
 arch/arm/mach-tegra/cpuidle-tegra30.c  |    1 -
 3 files changed, 3 deletions(-)

diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c
index 0f4e8c4..c527cff 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra114.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra114.c
@@ -49,7 +49,6 @@ int __init tegra114_cpuidle_init(void)
 		dev = &per_cpu(tegra_idle_device, cpu);
 		dev->cpu = cpu;
 
-		dev->state_count = drv->state_count;
 		ret = cpuidle_register_device(dev);
 		if (ret) {
 			pr_err("CPU%u: CPUidle device registration failed\n",
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
index 1ad1a67..b94d76a 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -243,7 +243,6 @@ int __init tegra20_cpuidle_init(void)
 		dev->coupled_cpus = *cpu_possible_mask;
 #endif
 
-		dev->state_count = drv->state_count;
 		ret = cpuidle_register_device(dev);
 		if (ret) {
 			pr_err("CPU%u: CPUidle device registration failed\n",
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c
index 8b50cf4..c4e01fe 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra30.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra30.c
@@ -176,7 +176,6 @@ int __init tegra30_cpuidle_init(void)
 		dev = &per_cpu(tegra_idle_device, cpu);
 		dev->cpu = cpu;
 
-		dev->state_count = drv->state_count;
 		ret = cpuidle_register_device(dev);
 		if (ret) {
 			pr_err("CPU%u: CPUidle device registration failed\n",
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 5/9] ARM: tegra: cpuidle: remove useless initialization
@ 2013-04-03 12:15   ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

dev->state_count is initialized automatically by cpuidle_register_device.

When drv->state_count is equal to dev->state_count, no need to init this
field, so removing it.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Joseph Lo <josephl@nvidia.com>
Acked-by: Joseph Lo <josephl@nvidia.com>
---
 arch/arm/mach-tegra/cpuidle-tegra114.c |    1 -
 arch/arm/mach-tegra/cpuidle-tegra20.c  |    1 -
 arch/arm/mach-tegra/cpuidle-tegra30.c  |    1 -
 3 files changed, 3 deletions(-)

diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c
index 0f4e8c4..c527cff 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra114.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra114.c
@@ -49,7 +49,6 @@ int __init tegra114_cpuidle_init(void)
 		dev = &per_cpu(tegra_idle_device, cpu);
 		dev->cpu = cpu;
 
-		dev->state_count = drv->state_count;
 		ret = cpuidle_register_device(dev);
 		if (ret) {
 			pr_err("CPU%u: CPUidle device registration failed\n",
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
index 1ad1a67..b94d76a 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -243,7 +243,6 @@ int __init tegra20_cpuidle_init(void)
 		dev->coupled_cpus = *cpu_possible_mask;
 #endif
 
-		dev->state_count = drv->state_count;
 		ret = cpuidle_register_device(dev);
 		if (ret) {
 			pr_err("CPU%u: CPUidle device registration failed\n",
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c
index 8b50cf4..c4e01fe 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra30.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra30.c
@@ -176,7 +176,6 @@ int __init tegra30_cpuidle_init(void)
 		dev = &per_cpu(tegra_idle_device, cpu);
 		dev->cpu = cpu;
 
-		dev->state_count = drv->state_count;
 		ret = cpuidle_register_device(dev);
 		if (ret) {
 			pr_err("CPU%u: CPUidle device registration failed\n",
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 6/9] ARM: davinci: cpuidle: fix wrong enter function
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-03 12:15     ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: rjw-KKrjLPT3xs0
  Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA, patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	lenb-DgEjT+Ai2ygdnm+yROfE0A, nsekhar-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

The davinci_enter_idle is called from the cpuidle with the
cpuidle_wrap_enter function. This one does the time compution
for entering and exiting the idle function and then we call
again cpuidle_wrap_enter for cpu_do_idle. This is wrong, we
are calling recursively cpuidle_wrap_enter for nothing and
furthermore reenabling the local irq.

Remove this and replace it by the cpu_do_idle function.

Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
---
 arch/arm/mach-davinci/cpuidle.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c
index 5ac9e93..22d6d4a 100644
--- a/arch/arm/mach-davinci/cpuidle.c
+++ b/arch/arm/mach-davinci/cpuidle.c
@@ -50,14 +50,10 @@ static void davinci_save_ddr_power(int enter, bool pdown)
 
 /* Actual code that puts the SoC in different idle states */
 static int davinci_enter_idle(struct cpuidle_device *dev,
-				struct cpuidle_driver *drv,
-						int index)
+			      struct cpuidle_driver *drv, int index)
 {
 	davinci_save_ddr_power(1, ddr2_pdown);
-
-	index = cpuidle_wrap_enter(dev,	drv, index,
-				arm_cpuidle_simple_enter);
-
+	cpu_do_idle();
 	davinci_save_ddr_power(0, ddr2_pdown);
 
 	return index;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 6/9] ARM: davinci: cpuidle: fix wrong enter function
@ 2013-04-03 12:15     ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

The davinci_enter_idle is called from the cpuidle with the
cpuidle_wrap_enter function. This one does the time compution
for entering and exiting the idle function and then we call
again cpuidle_wrap_enter for cpu_do_idle. This is wrong, we
are calling recursively cpuidle_wrap_enter for nothing and
furthermore reenabling the local irq.

Remove this and replace it by the cpu_do_idle function.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/mach-davinci/cpuidle.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c
index 5ac9e93..22d6d4a 100644
--- a/arch/arm/mach-davinci/cpuidle.c
+++ b/arch/arm/mach-davinci/cpuidle.c
@@ -50,14 +50,10 @@ static void davinci_save_ddr_power(int enter, bool pdown)
 
 /* Actual code that puts the SoC in different idle states */
 static int davinci_enter_idle(struct cpuidle_device *dev,
-				struct cpuidle_driver *drv,
-						int index)
+			      struct cpuidle_driver *drv, int index)
 {
 	davinci_save_ddr_power(1, ddr2_pdown);
-
-	index = cpuidle_wrap_enter(dev,	drv, index,
-				arm_cpuidle_simple_enter);
-
+	cpu_do_idle();
 	davinci_save_ddr_power(0, ddr2_pdown);
 
 	return index;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-03 12:15   ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: rjw
  Cc: linux-pm, patches, linaro-kernel, linux-arm-kernel, linux,
	rnayak, swarren, linux-tegra, horms+renesas, santosh.shilimkar,
	arnd, lenb, nsekhar, josephl, deepthi

The start/stop_critical_timings are called from arch/x86/kernel/process.c
in the cpu_idle loop function.

Remove the ones in the cpuidle driver.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/idle/intel_idle.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 5d66750..c99c31e 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
 	if (!(lapic_timer_reliable_states & (1 << (cstate))))
 		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
 
-	stop_critical_timings();
 	if (!need_resched()) {
 
 		__monitor((void *)&current_thread_info()->flags, 0, 0);
@@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
 			__mwait(eax, ecx);
 	}
 
-	start_critical_timings();
-
 	if (!(lapic_timer_reliable_states & (1 << (cstate))))
 		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
@ 2013-04-03 12:15   ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

The start/stop_critical_timings are called from arch/x86/kernel/process.c
in the cpu_idle loop function.

Remove the ones in the cpuidle driver.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/idle/intel_idle.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 5d66750..c99c31e 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
 	if (!(lapic_timer_reliable_states & (1 << (cstate))))
 		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
 
-	stop_critical_timings();
 	if (!need_resched()) {
 
 		__monitor((void *)&current_thread_info()->flags, 0, 0);
@@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
 			__mwait(eax, ecx);
 	}
 
-	start_critical_timings();
-
 	if (!(lapic_timer_reliable_states & (1 << (cstate))))
 		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 8/9] ARM: omap3: cpuidle: enable time keeping
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-03 12:15   ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: rjw
  Cc: linux-pm, patches, linaro-kernel, linux-arm-kernel, linux,
	rnayak, swarren, linux-tegra, horms+renesas, santosh.shilimkar,
	arnd, lenb, nsekhar, josephl, deepthi

The TIME_VALID flag is specified for the different states but
the time residency computation is not done, no tk flag, no time
computation in the idle function.

Set the en_core_tk_irqen flag to activate it.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/mach-omap2/cpuidle34xx.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 80392fc..4f67a5b 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -274,8 +274,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
 static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
 
 static struct cpuidle_driver omap3_idle_driver = {
-	.name =		"omap3_idle",
-	.owner =	THIS_MODULE,
+	.name             = "omap3_idle",
+	.owner            = THIS_MODULE,
+	.en_core_tk_irqen = 1,
 	.states = {
 		{
 			.enter		  = omap3_enter_idle_bm,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 8/9] ARM: omap3: cpuidle: enable time keeping
@ 2013-04-03 12:15   ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

The TIME_VALID flag is specified for the different states but
the time residency computation is not done, no tk flag, no time
computation in the idle function.

Set the en_core_tk_irqen flag to activate it.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/mach-omap2/cpuidle34xx.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 80392fc..4f67a5b 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -274,8 +274,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
 static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
 
 static struct cpuidle_driver omap3_idle_driver = {
-	.name =		"omap3_idle",
-	.owner =	THIS_MODULE,
+	.name             = "omap3_idle",
+	.owner            = THIS_MODULE,
+	.en_core_tk_irqen = 1,
 	.states = {
 		{
 			.enter		  = omap3_enter_idle_bm,
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 9/9] POWERPC: pseries: cpuidle: use time keeping flag
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-03 12:15     ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: rjw-KKrjLPT3xs0
  Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA, patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	lenb-DgEjT+Ai2ygdnm+yROfE0A, nsekhar-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

The current code computes the idle time but that can be handled
by the cpuidle framework if we enable the .en_core_tk_irqen flag.

Set the flag and remove the code related to the time computation.

Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Signed-off-by: Deepthi Dharwar <deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
 arch/powerpc/platforms/pseries/processor_idle.c |   35 ++++++++++-------------
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
index 4d806b4..a197120 100644
--- a/arch/powerpc/platforms/pseries/processor_idle.c
+++ b/arch/powerpc/platforms/pseries/processor_idle.c
@@ -23,8 +23,9 @@
 #include "pseries.h"
 
 struct cpuidle_driver pseries_idle_driver = {
-	.name =		"pseries_idle",
-	.owner =	THIS_MODULE,
+	.name             = "pseries_idle",
+	.owner            = THIS_MODULE,
+	.en_core_tk_irqen = 1,
 };
 
 #define MAX_IDLE_STATE_COUNT	2
@@ -33,10 +34,8 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
 static struct cpuidle_device __percpu *pseries_cpuidle_devices;
 static struct cpuidle_state *cpuidle_state_table;
 
-static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
+static inline void idle_loop_prolog(unsigned long *in_purr)
 {
-
-	*kt_before = ktime_get();
 	*in_purr = mfspr(SPRN_PURR);
 	/*
 	 * Indicate to the HV that we are idle. Now would be
@@ -45,12 +44,10 @@ static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
 	get_lppaca()->idle = 1;
 }
 
-static inline  s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before)
+static inline void idle_loop_epilog(unsigned long in_purr)
 {
 	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
 	get_lppaca()->idle = 0;
-
-	return ktime_to_us(ktime_sub(ktime_get(), kt_before));
 }
 
 static int snooze_loop(struct cpuidle_device *dev,
@@ -58,10 +55,9 @@ static int snooze_loop(struct cpuidle_device *dev,
 			int index)
 {
 	unsigned long in_purr;
-	ktime_t kt_before;
 	int cpu = dev->cpu;
 
-	idle_loop_prolog(&in_purr, &kt_before);
+	idle_loop_prolog(&in_purr);
 	local_irq_enable();
 	set_thread_flag(TIF_POLLING_NRFLAG);
 
@@ -75,8 +71,8 @@ static int snooze_loop(struct cpuidle_device *dev,
 	clear_thread_flag(TIF_POLLING_NRFLAG);
 	smp_mb();
 
-	dev->last_residency =
-		(int)idle_loop_epilog(in_purr, kt_before);
+	idle_loop_epilog(in_purr);
+
 	return index;
 }
 
@@ -102,9 +98,8 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
 				int index)
 {
 	unsigned long in_purr;
-	ktime_t kt_before;
 
-	idle_loop_prolog(&in_purr, &kt_before);
+	idle_loop_prolog(&in_purr);
 	get_lppaca()->donate_dedicated_cpu = 1;
 
 	ppc64_runlatch_off();
@@ -112,8 +107,9 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
 	check_and_cede_processor();
 
 	get_lppaca()->donate_dedicated_cpu = 0;
-	dev->last_residency =
-		(int)idle_loop_epilog(in_purr, kt_before);
+
+	idle_loop_epilog(in_purr);
+
 	return index;
 }
 
@@ -122,9 +118,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
 			int index)
 {
 	unsigned long in_purr;
-	ktime_t kt_before;
 
-	idle_loop_prolog(&in_purr, &kt_before);
+	idle_loop_prolog(&in_purr);
 
 	/*
 	 * Yield the processor to the hypervisor.  We return if
@@ -135,8 +130,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
 	 */
 	check_and_cede_processor();
 
-	dev->last_residency =
-		(int)idle_loop_epilog(in_purr, kt_before);
+	idle_loop_epilog(in_purr);
+
 	return index;
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 9/9] POWERPC: pseries: cpuidle: use time keeping flag
@ 2013-04-03 12:15     ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel

The current code computes the idle time but that can be handled
by the cpuidle framework if we enable the .en_core_tk_irqen flag.

Set the flag and remove the code related to the time computation.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/pseries/processor_idle.c |   35 ++++++++++-------------
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
index 4d806b4..a197120 100644
--- a/arch/powerpc/platforms/pseries/processor_idle.c
+++ b/arch/powerpc/platforms/pseries/processor_idle.c
@@ -23,8 +23,9 @@
 #include "pseries.h"
 
 struct cpuidle_driver pseries_idle_driver = {
-	.name =		"pseries_idle",
-	.owner =	THIS_MODULE,
+	.name             = "pseries_idle",
+	.owner            = THIS_MODULE,
+	.en_core_tk_irqen = 1,
 };
 
 #define MAX_IDLE_STATE_COUNT	2
@@ -33,10 +34,8 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
 static struct cpuidle_device __percpu *pseries_cpuidle_devices;
 static struct cpuidle_state *cpuidle_state_table;
 
-static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
+static inline void idle_loop_prolog(unsigned long *in_purr)
 {
-
-	*kt_before = ktime_get();
 	*in_purr = mfspr(SPRN_PURR);
 	/*
 	 * Indicate to the HV that we are idle. Now would be
@@ -45,12 +44,10 @@ static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
 	get_lppaca()->idle = 1;
 }
 
-static inline  s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before)
+static inline void idle_loop_epilog(unsigned long in_purr)
 {
 	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
 	get_lppaca()->idle = 0;
-
-	return ktime_to_us(ktime_sub(ktime_get(), kt_before));
 }
 
 static int snooze_loop(struct cpuidle_device *dev,
@@ -58,10 +55,9 @@ static int snooze_loop(struct cpuidle_device *dev,
 			int index)
 {
 	unsigned long in_purr;
-	ktime_t kt_before;
 	int cpu = dev->cpu;
 
-	idle_loop_prolog(&in_purr, &kt_before);
+	idle_loop_prolog(&in_purr);
 	local_irq_enable();
 	set_thread_flag(TIF_POLLING_NRFLAG);
 
@@ -75,8 +71,8 @@ static int snooze_loop(struct cpuidle_device *dev,
 	clear_thread_flag(TIF_POLLING_NRFLAG);
 	smp_mb();
 
-	dev->last_residency =
-		(int)idle_loop_epilog(in_purr, kt_before);
+	idle_loop_epilog(in_purr);
+
 	return index;
 }
 
@@ -102,9 +98,8 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
 				int index)
 {
 	unsigned long in_purr;
-	ktime_t kt_before;
 
-	idle_loop_prolog(&in_purr, &kt_before);
+	idle_loop_prolog(&in_purr);
 	get_lppaca()->donate_dedicated_cpu = 1;
 
 	ppc64_runlatch_off();
@@ -112,8 +107,9 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
 	check_and_cede_processor();
 
 	get_lppaca()->donate_dedicated_cpu = 0;
-	dev->last_residency =
-		(int)idle_loop_epilog(in_purr, kt_before);
+
+	idle_loop_epilog(in_purr);
+
 	return index;
 }
 
@@ -122,9 +118,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
 			int index)
 {
 	unsigned long in_purr;
-	ktime_t kt_before;
 
-	idle_loop_prolog(&in_purr, &kt_before);
+	idle_loop_prolog(&in_purr);
 
 	/*
 	 * Yield the processor to the hypervisor.  We return if
@@ -135,8 +130,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
 	 */
 	check_and_cede_processor();
 
-	dev->last_residency =
-		(int)idle_loop_epilog(in_purr, kt_before);
+	idle_loop_epilog(in_purr);
+
 	return index;
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/9] ARM: cpuidle: remove useless declaration
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-03 12:23   ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:23 UTC (permalink / raw)
  To: rjw
  Cc: deepthi, linaro-kernel, linux, swarren, patches, linux-pm,
	rnayak, nsekhar, josephl, linux-tegra, horms+renesas,
	linux-arm-kernel, lenb

On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> The noop functions code is not necessary because the header file is
> included in files which are compiled when CONFIG_CPU_IDLE is on.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

I have been involved in the development of this file. I know Rob is no
longer working on this neither monitoring the code.

Russell are you ok with this patch ? Rafael needs your ack to take this
patch into its tree.

Thanks

-- Daniel

> ---
>  arch/arm/include/asm/cpuidle.h |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
> index 2fca60a..7367787 100644
> --- a/arch/arm/include/asm/cpuidle.h
> +++ b/arch/arm/include/asm/cpuidle.h
> @@ -1,13 +1,8 @@
>  #ifndef __ASM_ARM_CPUIDLE_H
>  #define __ASM_ARM_CPUIDLE_H
>  
> -#ifdef CONFIG_CPU_IDLE
>  extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> -		struct cpuidle_driver *drv, int index);
> -#else
> -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> -		struct cpuidle_driver *drv, int index) { return -ENODEV; }
> -#endif
> +				    struct cpuidle_driver *drv, int index);
>  
>  /* Common ARM WFI state */
>  #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-03 12:23   ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 12:23 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> The noop functions code is not necessary because the header file is
> included in files which are compiled when CONFIG_CPU_IDLE is on.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

I have been involved in the development of this file. I know Rob is no
longer working on this neither monitoring the code.

Russell are you ok with this patch ? Rafael needs your ack to take this
patch into its tree.

Thanks

-- Daniel

> ---
>  arch/arm/include/asm/cpuidle.h |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
> index 2fca60a..7367787 100644
> --- a/arch/arm/include/asm/cpuidle.h
> +++ b/arch/arm/include/asm/cpuidle.h
> @@ -1,13 +1,8 @@
>  #ifndef __ASM_ARM_CPUIDLE_H
>  #define __ASM_ARM_CPUIDLE_H
>  
> -#ifdef CONFIG_CPU_IDLE
>  extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> -		struct cpuidle_driver *drv, int index);
> -#else
> -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> -		struct cpuidle_driver *drv, int index) { return -ENODEV; }
> -#endif
> +				    struct cpuidle_driver *drv, int index);
>  
>  /* Common ARM WFI state */
>  #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 9/9] POWERPC: pseries: cpuidle: use time keeping flag
  2013-04-03 12:15     ` Daniel Lezcano
@ 2013-04-03 14:25         ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 14:25 UTC (permalink / raw)
  To: rjw-KKrjLPT3xs0, deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  Cc: linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	patches-QSEj5FYQhm4dnm+yROfE0A, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	rnayak-l0cyMroinI0, nsekhar-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	lenb-DgEjT+Ai2ygdnm+yROfE0A

On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> The current code computes the idle time but that can be handled
> by the cpuidle framework if we enable the .en_core_tk_irqen flag.
>
> Set the flag and remove the code related to the time computation.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Deepthi Dharwar <deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> ---

Rafael,

Deepthi took the patch, did a fix and tested it, this is why there is
its signed-off.

Deepthi, could you ack the patch for Rafael also ?

Thanks
-- Daniel

>  arch/powerpc/platforms/pseries/processor_idle.c |   35 ++++++++++-------------
>  1 file changed, 15 insertions(+), 20 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
> index 4d806b4..a197120 100644
> --- a/arch/powerpc/platforms/pseries/processor_idle.c
> +++ b/arch/powerpc/platforms/pseries/processor_idle.c
> @@ -23,8 +23,9 @@
>  #include "pseries.h"
>  
>  struct cpuidle_driver pseries_idle_driver = {
> -	.name =		"pseries_idle",
> -	.owner =	THIS_MODULE,
> +	.name             = "pseries_idle",
> +	.owner            = THIS_MODULE,
> +	.en_core_tk_irqen = 1,
>  };
>  
>  #define MAX_IDLE_STATE_COUNT	2
> @@ -33,10 +34,8 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
>  static struct cpuidle_device __percpu *pseries_cpuidle_devices;
>  static struct cpuidle_state *cpuidle_state_table;
>  
> -static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
> +static inline void idle_loop_prolog(unsigned long *in_purr)
>  {
> -
> -	*kt_before = ktime_get();
>  	*in_purr = mfspr(SPRN_PURR);
>  	/*
>  	 * Indicate to the HV that we are idle. Now would be
> @@ -45,12 +44,10 @@ static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
>  	get_lppaca()->idle = 1;
>  }
>  
> -static inline  s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before)
> +static inline void idle_loop_epilog(unsigned long in_purr)
>  {
>  	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
>  	get_lppaca()->idle = 0;
> -
> -	return ktime_to_us(ktime_sub(ktime_get(), kt_before));
>  }
>  
>  static int snooze_loop(struct cpuidle_device *dev,
> @@ -58,10 +55,9 @@ static int snooze_loop(struct cpuidle_device *dev,
>  			int index)
>  {
>  	unsigned long in_purr;
> -	ktime_t kt_before;
>  	int cpu = dev->cpu;
>  
> -	idle_loop_prolog(&in_purr, &kt_before);
> +	idle_loop_prolog(&in_purr);
>  	local_irq_enable();
>  	set_thread_flag(TIF_POLLING_NRFLAG);
>  
> @@ -75,8 +71,8 @@ static int snooze_loop(struct cpuidle_device *dev,
>  	clear_thread_flag(TIF_POLLING_NRFLAG);
>  	smp_mb();
>  
> -	dev->last_residency =
> -		(int)idle_loop_epilog(in_purr, kt_before);
> +	idle_loop_epilog(in_purr);
> +
>  	return index;
>  }
>  
> @@ -102,9 +98,8 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
>  				int index)
>  {
>  	unsigned long in_purr;
> -	ktime_t kt_before;
>  
> -	idle_loop_prolog(&in_purr, &kt_before);
> +	idle_loop_prolog(&in_purr);
>  	get_lppaca()->donate_dedicated_cpu = 1;
>  
>  	ppc64_runlatch_off();
> @@ -112,8 +107,9 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
>  	check_and_cede_processor();
>  
>  	get_lppaca()->donate_dedicated_cpu = 0;
> -	dev->last_residency =
> -		(int)idle_loop_epilog(in_purr, kt_before);
> +
> +	idle_loop_epilog(in_purr);
> +
>  	return index;
>  }
>  
> @@ -122,9 +118,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
>  			int index)
>  {
>  	unsigned long in_purr;
> -	ktime_t kt_before;
>  
> -	idle_loop_prolog(&in_purr, &kt_before);
> +	idle_loop_prolog(&in_purr);
>  
>  	/*
>  	 * Yield the processor to the hypervisor.  We return if
> @@ -135,8 +130,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
>  	 */
>  	check_and_cede_processor();
>  
> -	dev->last_residency =
> -		(int)idle_loop_epilog(in_purr, kt_before);
> +	idle_loop_epilog(in_purr);
> +
>  	return index;
>  }
>  


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 9/9] POWERPC: pseries: cpuidle: use time keeping flag
@ 2013-04-03 14:25         ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 14:25 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> The current code computes the idle time but that can be handled
> by the cpuidle framework if we enable the .en_core_tk_irqen flag.
>
> Set the flag and remove the code related to the time computation.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
> ---

Rafael,

Deepthi took the patch, did a fix and tested it, this is why there is
its signed-off.

Deepthi, could you ack the patch for Rafael also ?

Thanks
-- Daniel

>  arch/powerpc/platforms/pseries/processor_idle.c |   35 ++++++++++-------------
>  1 file changed, 15 insertions(+), 20 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
> index 4d806b4..a197120 100644
> --- a/arch/powerpc/platforms/pseries/processor_idle.c
> +++ b/arch/powerpc/platforms/pseries/processor_idle.c
> @@ -23,8 +23,9 @@
>  #include "pseries.h"
>  
>  struct cpuidle_driver pseries_idle_driver = {
> -	.name =		"pseries_idle",
> -	.owner =	THIS_MODULE,
> +	.name             = "pseries_idle",
> +	.owner            = THIS_MODULE,
> +	.en_core_tk_irqen = 1,
>  };
>  
>  #define MAX_IDLE_STATE_COUNT	2
> @@ -33,10 +34,8 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
>  static struct cpuidle_device __percpu *pseries_cpuidle_devices;
>  static struct cpuidle_state *cpuidle_state_table;
>  
> -static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
> +static inline void idle_loop_prolog(unsigned long *in_purr)
>  {
> -
> -	*kt_before = ktime_get();
>  	*in_purr = mfspr(SPRN_PURR);
>  	/*
>  	 * Indicate to the HV that we are idle. Now would be
> @@ -45,12 +44,10 @@ static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
>  	get_lppaca()->idle = 1;
>  }
>  
> -static inline  s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before)
> +static inline void idle_loop_epilog(unsigned long in_purr)
>  {
>  	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
>  	get_lppaca()->idle = 0;
> -
> -	return ktime_to_us(ktime_sub(ktime_get(), kt_before));
>  }
>  
>  static int snooze_loop(struct cpuidle_device *dev,
> @@ -58,10 +55,9 @@ static int snooze_loop(struct cpuidle_device *dev,
>  			int index)
>  {
>  	unsigned long in_purr;
> -	ktime_t kt_before;
>  	int cpu = dev->cpu;
>  
> -	idle_loop_prolog(&in_purr, &kt_before);
> +	idle_loop_prolog(&in_purr);
>  	local_irq_enable();
>  	set_thread_flag(TIF_POLLING_NRFLAG);
>  
> @@ -75,8 +71,8 @@ static int snooze_loop(struct cpuidle_device *dev,
>  	clear_thread_flag(TIF_POLLING_NRFLAG);
>  	smp_mb();
>  
> -	dev->last_residency =
> -		(int)idle_loop_epilog(in_purr, kt_before);
> +	idle_loop_epilog(in_purr);
> +
>  	return index;
>  }
>  
> @@ -102,9 +98,8 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
>  				int index)
>  {
>  	unsigned long in_purr;
> -	ktime_t kt_before;
>  
> -	idle_loop_prolog(&in_purr, &kt_before);
> +	idle_loop_prolog(&in_purr);
>  	get_lppaca()->donate_dedicated_cpu = 1;
>  
>  	ppc64_runlatch_off();
> @@ -112,8 +107,9 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
>  	check_and_cede_processor();
>  
>  	get_lppaca()->donate_dedicated_cpu = 0;
> -	dev->last_residency =
> -		(int)idle_loop_epilog(in_purr, kt_before);
> +
> +	idle_loop_epilog(in_purr);
> +
>  	return index;
>  }
>  
> @@ -122,9 +118,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
>  			int index)
>  {
>  	unsigned long in_purr;
> -	ktime_t kt_before;
>  
> -	idle_loop_prolog(&in_purr, &kt_before);
> +	idle_loop_prolog(&in_purr);
>  
>  	/*
>  	 * Yield the processor to the hypervisor.  We return if
> @@ -135,8 +130,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
>  	 */
>  	check_and_cede_processor();
>  
> -	dev->last_residency =
> -		(int)idle_loop_epilog(in_purr, kt_before);
> +	idle_loop_epilog(in_purr);
> +
>  	return index;
>  }
>  


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 8/9] ARM: omap3: cpuidle: enable time keeping
  2013-04-03 12:15   ` Daniel Lezcano
@ 2013-04-03 17:47     ` Kevin Hilman
  -1 siblings, 0 replies; 58+ messages in thread
From: Kevin Hilman @ 2013-04-03 17:47 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rjw, linux-pm, patches, linaro-kernel, linux-arm-kernel, linux,
	rnayak, swarren, linux-tegra, horms+renesas, santosh.shilimkar,
	arnd, lenb, nsekhar, josephl, deepthi

Daniel Lezcano <daniel.lezcano@linaro.org> writes:

> The TIME_VALID flag is specified for the different states but
> the time residency computation is not done, no tk flag, no time
> computation in the idle function.
>
> Set the en_core_tk_irqen flag to activate it.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Acked-by: Kevin Hilman <khilman@linaro.org>

Also, is this a regression fix that also needs to hit v3.9?

Kevin

> ---
>  arch/arm/mach-omap2/cpuidle34xx.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
> index 80392fc..4f67a5b 100644
> --- a/arch/arm/mach-omap2/cpuidle34xx.c
> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
> @@ -274,8 +274,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
>  static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
>  
>  static struct cpuidle_driver omap3_idle_driver = {
> -	.name =		"omap3_idle",
> -	.owner =	THIS_MODULE,
> +	.name             = "omap3_idle",
> +	.owner            = THIS_MODULE,
> +	.en_core_tk_irqen = 1,
>  	.states = {
>  		{
>  			.enter		  = omap3_enter_idle_bm,

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 8/9] ARM: omap3: cpuidle: enable time keeping
@ 2013-04-03 17:47     ` Kevin Hilman
  0 siblings, 0 replies; 58+ messages in thread
From: Kevin Hilman @ 2013-04-03 17:47 UTC (permalink / raw)
  To: linux-arm-kernel

Daniel Lezcano <daniel.lezcano@linaro.org> writes:

> The TIME_VALID flag is specified for the different states but
> the time residency computation is not done, no tk flag, no time
> computation in the idle function.
>
> Set the en_core_tk_irqen flag to activate it.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Acked-by: Kevin Hilman <khilman@linaro.org>

Also, is this a regression fix that also needs to hit v3.9?

Kevin

> ---
>  arch/arm/mach-omap2/cpuidle34xx.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
> index 80392fc..4f67a5b 100644
> --- a/arch/arm/mach-omap2/cpuidle34xx.c
> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
> @@ -274,8 +274,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
>  static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
>  
>  static struct cpuidle_driver omap3_idle_driver = {
> -	.name =		"omap3_idle",
> -	.owner =	THIS_MODULE,
> +	.name             = "omap3_idle",
> +	.owner            = THIS_MODULE,
> +	.en_core_tk_irqen = 1,
>  	.states = {
>  		{
>  			.enter		  = omap3_enter_idle_bm,

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 8/9] ARM: omap3: cpuidle: enable time keeping
  2013-04-03 17:47     ` Kevin Hilman
@ 2013-04-03 20:49         ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 20:49 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: rjw-KKrjLPT3xs0, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	lenb-DgEjT+Ai2ygdnm+yROfE0A, nsekhar-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

On 04/03/2013 07:47 PM, Kevin Hilman wrote:
> Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> writes:
> 
>> The TIME_VALID flag is specified for the different states but
>> the time residency computation is not done, no tk flag, no time
>> computation in the idle function.
>>
>> Set the en_core_tk_irqen flag to activate it.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> Acked-by: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
> 
> Acked-by: Kevin Hilman <khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> 
> Also, is this a regression fix that also needs to hit v3.9?

Yes, I think so.


>> ---
>>  arch/arm/mach-omap2/cpuidle34xx.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
>> index 80392fc..4f67a5b 100644
>> --- a/arch/arm/mach-omap2/cpuidle34xx.c
>> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
>> @@ -274,8 +274,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
>>  static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
>>  
>>  static struct cpuidle_driver omap3_idle_driver = {
>> -	.name =		"omap3_idle",
>> -	.owner =	THIS_MODULE,
>> +	.name             = "omap3_idle",
>> +	.owner            = THIS_MODULE,
>> +	.en_core_tk_irqen = 1,
>>  	.states = {
>>  		{
>>  			.enter		  = omap3_enter_idle_bm,


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 8/9] ARM: omap3: cpuidle: enable time keeping
@ 2013-04-03 20:49         ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-03 20:49 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/03/2013 07:47 PM, Kevin Hilman wrote:
> Daniel Lezcano <daniel.lezcano@linaro.org> writes:
> 
>> The TIME_VALID flag is specified for the different states but
>> the time residency computation is not done, no tk flag, no time
>> computation in the idle function.
>>
>> Set the en_core_tk_irqen flag to activate it.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> 
> Acked-by: Kevin Hilman <khilman@linaro.org>
> 
> Also, is this a regression fix that also needs to hit v3.9?

Yes, I think so.


>> ---
>>  arch/arm/mach-omap2/cpuidle34xx.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
>> index 80392fc..4f67a5b 100644
>> --- a/arch/arm/mach-omap2/cpuidle34xx.c
>> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
>> @@ -274,8 +274,9 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
>>  static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
>>  
>>  static struct cpuidle_driver omap3_idle_driver = {
>> -	.name =		"omap3_idle",
>> -	.owner =	THIS_MODULE,
>> +	.name             = "omap3_idle",
>> +	.owner            = THIS_MODULE,
>> +	.en_core_tk_irqen = 1,
>>  	.states = {
>>  		{
>>  			.enter		  = omap3_enter_idle_bm,


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 8/9] ARM: omap3: cpuidle: enable time keeping
  2013-04-03 20:49         ` Daniel Lezcano
@ 2013-04-03 21:43             ` Kevin Hilman
  -1 siblings, 0 replies; 58+ messages in thread
From: Kevin Hilman @ 2013-04-03 21:43 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rjw-KKrjLPT3xs0, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	lenb-DgEjT+Ai2ygdnm+yROfE0A, nsekhar-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> writes:

> On 04/03/2013 07:47 PM, Kevin Hilman wrote:
>> Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> writes:
>> 
>>> The TIME_VALID flag is specified for the different states but
>>> the time residency computation is not done, no tk flag, no time
>>> computation in the idle function.
>>>
>>> Set the en_core_tk_irqen flag to activate it.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>> Acked-by: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
>> 
>> Acked-by: Kevin Hilman <khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> 
>> Also, is this a regression fix that also needs to hit v3.9?
>
> Yes, I think so.

OK.

I've got a handful of other OMAP CPUidle fixes queued for v3.10[1] so
I'll add this one to the queue and Cc: stable.

Thanks,

Kevin

[1]
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git for_3.10/cleanup/cpuidle

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 8/9] ARM: omap3: cpuidle: enable time keeping
@ 2013-04-03 21:43             ` Kevin Hilman
  0 siblings, 0 replies; 58+ messages in thread
From: Kevin Hilman @ 2013-04-03 21:43 UTC (permalink / raw)
  To: linux-arm-kernel

Daniel Lezcano <daniel.lezcano@linaro.org> writes:

> On 04/03/2013 07:47 PM, Kevin Hilman wrote:
>> Daniel Lezcano <daniel.lezcano@linaro.org> writes:
>> 
>>> The TIME_VALID flag is specified for the different states but
>>> the time residency computation is not done, no tk flag, no time
>>> computation in the idle function.
>>>
>>> Set the en_core_tk_irqen flag to activate it.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> 
>> Acked-by: Kevin Hilman <khilman@linaro.org>
>> 
>> Also, is this a regression fix that also needs to hit v3.9?
>
> Yes, I think so.

OK.

I've got a handful of other OMAP CPUidle fixes queued for v3.10[1] so
I'll add this one to the queue and Cc: stable.

Thanks,

Kevin

[1]
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git for_3.10/cleanup/cpuidle

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 6/9] ARM: davinci: cpuidle: fix wrong enter function
  2013-04-03 12:15     ` Daniel Lezcano
@ 2013-04-04  7:16       ` Sekhar Nori
  -1 siblings, 0 replies; 58+ messages in thread
From: Sekhar Nori @ 2013-04-04  7:16 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rjw, linux-pm, patches, linaro-kernel, linux-arm-kernel, linux,
	rnayak, swarren, linux-tegra, horms+renesas, santosh.shilimkar,
	arnd, lenb, josephl, deepthi

On 4/3/2013 5:45 PM, Daniel Lezcano wrote:
> The davinci_enter_idle is called from the cpuidle with the
> cpuidle_wrap_enter function. This one does the time compution
> for entering and exiting the idle function and then we call
> again cpuidle_wrap_enter for cpu_do_idle. This is wrong, we
> are calling recursively cpuidle_wrap_enter for nothing and
> furthermore reenabling the local irq.
> 
> Remove this and replace it by the cpu_do_idle function.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 6/9] ARM: davinci: cpuidle: fix wrong enter function
@ 2013-04-04  7:16       ` Sekhar Nori
  0 siblings, 0 replies; 58+ messages in thread
From: Sekhar Nori @ 2013-04-04  7:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 4/3/2013 5:45 PM, Daniel Lezcano wrote:
> The davinci_enter_idle is called from the cpuidle with the
> cpuidle_wrap_enter function. This one does the time compution
> for entering and exiting the idle function and then we call
> again cpuidle_wrap_enter for cpu_do_idle. This is wrong, we
> are calling recursively cpuidle_wrap_enter for nothing and
> furthermore reenabling the local irq.
> 
> Remove this and replace it by the cpu_do_idle function.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 9/9] POWERPC: pseries: cpuidle: use time keeping flag
  2013-04-03 14:25         ` Daniel Lezcano
@ 2013-04-04 11:01           ` Deepthi Dharwar
  -1 siblings, 0 replies; 58+ messages in thread
From: Deepthi Dharwar @ 2013-04-04 11:01 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rjw, linaro-kernel, linux, swarren, patches, linux-pm, rnayak,
	nsekhar, josephl, linux-tegra, horms+renesas, linux-arm-kernel,
	lenb

On 04/03/2013 07:55 PM, Daniel Lezcano wrote:
> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
>> The current code computes the idle time but that can be handled
>> by the cpuidle framework if we enable the .en_core_tk_irqen flag.
>>
>> Set the flag and remove the code related to the time computation.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
>> ---
> 
> Rafael,
> 
> Deepthi took the patch, did a fix and tested it, this is why there is
> its signed-off.
> 
> Deepthi, could you ack the patch for Rafael also ?
> 
> Thanks
> -- Daniel


Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>

>>  arch/powerpc/platforms/pseries/processor_idle.c |   35 ++++++++++-------------
>>  1 file changed, 15 insertions(+), 20 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
>> index 4d806b4..a197120 100644
>> --- a/arch/powerpc/platforms/pseries/processor_idle.c
>> +++ b/arch/powerpc/platforms/pseries/processor_idle.c
>> @@ -23,8 +23,9 @@
>>  #include "pseries.h"
>>  
>>  struct cpuidle_driver pseries_idle_driver = {
>> -	.name =		"pseries_idle",
>> -	.owner =	THIS_MODULE,
>> +	.name             = "pseries_idle",
>> +	.owner            = THIS_MODULE,
>> +	.en_core_tk_irqen = 1,
>>  };
>>  
>>  #define MAX_IDLE_STATE_COUNT	2
>> @@ -33,10 +34,8 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
>>  static struct cpuidle_device __percpu *pseries_cpuidle_devices;
>>  static struct cpuidle_state *cpuidle_state_table;
>>  
>> -static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
>> +static inline void idle_loop_prolog(unsigned long *in_purr)
>>  {
>> -
>> -	*kt_before = ktime_get();
>>  	*in_purr = mfspr(SPRN_PURR);
>>  	/*
>>  	 * Indicate to the HV that we are idle. Now would be
>> @@ -45,12 +44,10 @@ static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
>>  	get_lppaca()->idle = 1;
>>  }
>>  
>> -static inline  s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before)
>> +static inline void idle_loop_epilog(unsigned long in_purr)
>>  {
>>  	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
>>  	get_lppaca()->idle = 0;
>> -
>> -	return ktime_to_us(ktime_sub(ktime_get(), kt_before));
>>  }
>>  
>>  static int snooze_loop(struct cpuidle_device *dev,
>> @@ -58,10 +55,9 @@ static int snooze_loop(struct cpuidle_device *dev,
>>  			int index)
>>  {
>>  	unsigned long in_purr;
>> -	ktime_t kt_before;
>>  	int cpu = dev->cpu;
>>  
>> -	idle_loop_prolog(&in_purr, &kt_before);
>> +	idle_loop_prolog(&in_purr);
>>  	local_irq_enable();
>>  	set_thread_flag(TIF_POLLING_NRFLAG);
>>  
>> @@ -75,8 +71,8 @@ static int snooze_loop(struct cpuidle_device *dev,
>>  	clear_thread_flag(TIF_POLLING_NRFLAG);
>>  	smp_mb();
>>  
>> -	dev->last_residency =
>> -		(int)idle_loop_epilog(in_purr, kt_before);
>> +	idle_loop_epilog(in_purr);
>> +
>>  	return index;
>>  }
>>  
>> @@ -102,9 +98,8 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
>>  				int index)
>>  {
>>  	unsigned long in_purr;
>> -	ktime_t kt_before;
>>  
>> -	idle_loop_prolog(&in_purr, &kt_before);
>> +	idle_loop_prolog(&in_purr);
>>  	get_lppaca()->donate_dedicated_cpu = 1;
>>  
>>  	ppc64_runlatch_off();
>> @@ -112,8 +107,9 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
>>  	check_and_cede_processor();
>>  
>>  	get_lppaca()->donate_dedicated_cpu = 0;
>> -	dev->last_residency =
>> -		(int)idle_loop_epilog(in_purr, kt_before);
>> +
>> +	idle_loop_epilog(in_purr);
>> +
>>  	return index;
>>  }
>>  
>> @@ -122,9 +118,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
>>  			int index)
>>  {
>>  	unsigned long in_purr;
>> -	ktime_t kt_before;
>>  
>> -	idle_loop_prolog(&in_purr, &kt_before);
>> +	idle_loop_prolog(&in_purr);
>>  
>>  	/*
>>  	 * Yield the processor to the hypervisor.  We return if
>> @@ -135,8 +130,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
>>  	 */
>>  	check_and_cede_processor();
>>  
>> -	dev->last_residency =
>> -		(int)idle_loop_epilog(in_purr, kt_before);
>> +	idle_loop_epilog(in_purr);
>> +
>>  	return index;
>>  }
>>  
> 
> 


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 9/9] POWERPC: pseries: cpuidle: use time keeping flag
@ 2013-04-04 11:01           ` Deepthi Dharwar
  0 siblings, 0 replies; 58+ messages in thread
From: Deepthi Dharwar @ 2013-04-04 11:01 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/03/2013 07:55 PM, Daniel Lezcano wrote:
> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
>> The current code computes the idle time but that can be handled
>> by the cpuidle framework if we enable the .en_core_tk_irqen flag.
>>
>> Set the flag and remove the code related to the time computation.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
>> ---
> 
> Rafael,
> 
> Deepthi took the patch, did a fix and tested it, this is why there is
> its signed-off.
> 
> Deepthi, could you ack the patch for Rafael also ?
> 
> Thanks
> -- Daniel


Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>

>>  arch/powerpc/platforms/pseries/processor_idle.c |   35 ++++++++++-------------
>>  1 file changed, 15 insertions(+), 20 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
>> index 4d806b4..a197120 100644
>> --- a/arch/powerpc/platforms/pseries/processor_idle.c
>> +++ b/arch/powerpc/platforms/pseries/processor_idle.c
>> @@ -23,8 +23,9 @@
>>  #include "pseries.h"
>>  
>>  struct cpuidle_driver pseries_idle_driver = {
>> -	.name =		"pseries_idle",
>> -	.owner =	THIS_MODULE,
>> +	.name             = "pseries_idle",
>> +	.owner            = THIS_MODULE,
>> +	.en_core_tk_irqen = 1,
>>  };
>>  
>>  #define MAX_IDLE_STATE_COUNT	2
>> @@ -33,10 +34,8 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
>>  static struct cpuidle_device __percpu *pseries_cpuidle_devices;
>>  static struct cpuidle_state *cpuidle_state_table;
>>  
>> -static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
>> +static inline void idle_loop_prolog(unsigned long *in_purr)
>>  {
>> -
>> -	*kt_before = ktime_get();
>>  	*in_purr = mfspr(SPRN_PURR);
>>  	/*
>>  	 * Indicate to the HV that we are idle. Now would be
>> @@ -45,12 +44,10 @@ static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
>>  	get_lppaca()->idle = 1;
>>  }
>>  
>> -static inline  s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before)
>> +static inline void idle_loop_epilog(unsigned long in_purr)
>>  {
>>  	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
>>  	get_lppaca()->idle = 0;
>> -
>> -	return ktime_to_us(ktime_sub(ktime_get(), kt_before));
>>  }
>>  
>>  static int snooze_loop(struct cpuidle_device *dev,
>> @@ -58,10 +55,9 @@ static int snooze_loop(struct cpuidle_device *dev,
>>  			int index)
>>  {
>>  	unsigned long in_purr;
>> -	ktime_t kt_before;
>>  	int cpu = dev->cpu;
>>  
>> -	idle_loop_prolog(&in_purr, &kt_before);
>> +	idle_loop_prolog(&in_purr);
>>  	local_irq_enable();
>>  	set_thread_flag(TIF_POLLING_NRFLAG);
>>  
>> @@ -75,8 +71,8 @@ static int snooze_loop(struct cpuidle_device *dev,
>>  	clear_thread_flag(TIF_POLLING_NRFLAG);
>>  	smp_mb();
>>  
>> -	dev->last_residency =
>> -		(int)idle_loop_epilog(in_purr, kt_before);
>> +	idle_loop_epilog(in_purr);
>> +
>>  	return index;
>>  }
>>  
>> @@ -102,9 +98,8 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
>>  				int index)
>>  {
>>  	unsigned long in_purr;
>> -	ktime_t kt_before;
>>  
>> -	idle_loop_prolog(&in_purr, &kt_before);
>> +	idle_loop_prolog(&in_purr);
>>  	get_lppaca()->donate_dedicated_cpu = 1;
>>  
>>  	ppc64_runlatch_off();
>> @@ -112,8 +107,9 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
>>  	check_and_cede_processor();
>>  
>>  	get_lppaca()->donate_dedicated_cpu = 0;
>> -	dev->last_residency =
>> -		(int)idle_loop_epilog(in_purr, kt_before);
>> +
>> +	idle_loop_epilog(in_purr);
>> +
>>  	return index;
>>  }
>>  
>> @@ -122,9 +118,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
>>  			int index)
>>  {
>>  	unsigned long in_purr;
>> -	ktime_t kt_before;
>>  
>> -	idle_loop_prolog(&in_purr, &kt_before);
>> +	idle_loop_prolog(&in_purr);
>>  
>>  	/*
>>  	 * Yield the processor to the hypervisor.  We return if
>> @@ -135,8 +130,8 @@ static int shared_cede_loop(struct cpuidle_device *dev,
>>  	 */
>>  	check_and_cede_processor();
>>  
>> -	dev->last_residency =
>> -		(int)idle_loop_epilog(in_purr, kt_before);
>> +	idle_loop_epilog(in_purr);
>> +
>>  	return index;
>>  }
>>  
> 
> 

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/9] ARM: cpuidle: remove useless declaration
  2013-04-03 12:15 ` Daniel Lezcano
@ 2013-04-04 22:30     ` Rafael J. Wysocki
  -1 siblings, 0 replies; 58+ messages in thread
From: Rafael J. Wysocki @ 2013-04-04 22:30 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA, patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	lenb-DgEjT+Ai2ygdnm+yROfE0A, nsekhar-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

On Wednesday, April 03, 2013 02:15:14 PM Daniel Lezcano wrote:
> The noop functions code is not necessary because the header file is
> included in files which are compiled when CONFIG_CPU_IDLE is on.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

I need an ACK for this one.

Thanks,
Rafael


> ---
>  arch/arm/include/asm/cpuidle.h |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
> index 2fca60a..7367787 100644
> --- a/arch/arm/include/asm/cpuidle.h
> +++ b/arch/arm/include/asm/cpuidle.h
> @@ -1,13 +1,8 @@
>  #ifndef __ASM_ARM_CPUIDLE_H
>  #define __ASM_ARM_CPUIDLE_H
>  
> -#ifdef CONFIG_CPU_IDLE
>  extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> -		struct cpuidle_driver *drv, int index);
> -#else
> -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> -		struct cpuidle_driver *drv, int index) { return -ENODEV; }
> -#endif
> +				    struct cpuidle_driver *drv, int index);
>  
>  /* Common ARM WFI state */
>  #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-04 22:30     ` Rafael J. Wysocki
  0 siblings, 0 replies; 58+ messages in thread
From: Rafael J. Wysocki @ 2013-04-04 22:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday, April 03, 2013 02:15:14 PM Daniel Lezcano wrote:
> The noop functions code is not necessary because the header file is
> included in files which are compiled when CONFIG_CPU_IDLE is on.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

I need an ACK for this one.

Thanks,
Rafael


> ---
>  arch/arm/include/asm/cpuidle.h |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
> index 2fca60a..7367787 100644
> --- a/arch/arm/include/asm/cpuidle.h
> +++ b/arch/arm/include/asm/cpuidle.h
> @@ -1,13 +1,8 @@
>  #ifndef __ASM_ARM_CPUIDLE_H
>  #define __ASM_ARM_CPUIDLE_H
>  
> -#ifdef CONFIG_CPU_IDLE
>  extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> -		struct cpuidle_driver *drv, int index);
> -#else
> -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> -		struct cpuidle_driver *drv, int index) { return -ENODEV; }
> -#endif
> +				    struct cpuidle_driver *drv, int index);
>  
>  /* Common ARM WFI state */
>  #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
  2013-04-03 12:15   ` Daniel Lezcano
@ 2013-04-04 22:31       ` Rafael J. Wysocki
  -1 siblings, 0 replies; 58+ messages in thread
From: Rafael J. Wysocki @ 2013-04-04 22:31 UTC (permalink / raw)
  To: Daniel Lezcano, lenb-DgEjT+Ai2ygdnm+yROfE0A, Len Brown
  Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA, patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	nsekhar-l0cyMroinI0, josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
> The start/stop_critical_timings are called from arch/x86/kernel/process.c
> in the cpu_idle loop function.
> 
> Remove the ones in the cpuidle driver.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

For this one I need an ACK from Len.

Len, any objections?

Rafael


> ---
>  drivers/idle/intel_idle.c |    3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 5d66750..c99c31e 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
>  
> -	stop_critical_timings();
>  	if (!need_resched()) {
>  
>  		__monitor((void *)&current_thread_info()->flags, 0, 0);
> @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
>  			__mwait(eax, ecx);
>  	}
>  
> -	start_critical_timings();
> -
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
>  
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
@ 2013-04-04 22:31       ` Rafael J. Wysocki
  0 siblings, 0 replies; 58+ messages in thread
From: Rafael J. Wysocki @ 2013-04-04 22:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
> The start/stop_critical_timings are called from arch/x86/kernel/process.c
> in the cpu_idle loop function.
> 
> Remove the ones in the cpuidle driver.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

For this one I need an ACK from Len.

Len, any objections?

Rafael


> ---
>  drivers/idle/intel_idle.c |    3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 5d66750..c99c31e 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
>  
> -	stop_critical_timings();
>  	if (!need_resched()) {
>  
>  		__monitor((void *)&current_thread_info()->flags, 0, 0);
> @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
>  			__mwait(eax, ecx);
>  	}
>  
> -	start_critical_timings();
> -
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
>  
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
  2013-04-04 22:31       ` Rafael J. Wysocki
@ 2013-04-07 20:52           ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-07 20:52 UTC (permalink / raw)
  To: Len Brown
  Cc: Rafael J. Wysocki, lenb-DgEjT+Ai2ygdnm+yROfE0A,
	linux-pm-u79uwXL29TY76Z2rM5mHXA, patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	nsekhar-l0cyMroinI0, josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
> On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
>> The start/stop_critical_timings are called from arch/x86/kernel/process.c
>> in the cpu_idle loop function.
>>
>> Remove the ones in the cpuidle driver.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> 
> For this one I need an ACK from Len.
> 
> Len, any objections?


Len ? ping ...

>> ---
>>  drivers/idle/intel_idle.c |    3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
>> index 5d66750..c99c31e 100644
>> --- a/drivers/idle/intel_idle.c
>> +++ b/drivers/idle/intel_idle.c
>> @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
>>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
>>  
>> -	stop_critical_timings();
>>  	if (!need_resched()) {
>>  
>>  		__monitor((void *)&current_thread_info()->flags, 0, 0);
>> @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
>>  			__mwait(eax, ecx);
>>  	}
>>  
>> -	start_critical_timings();
>> -
>>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
>>  
>>


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  * English - detected
  * English
  * French

  * English
  * French

 <javascript:void(0);> <#>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
@ 2013-04-07 20:52           ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-07 20:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
> On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
>> The start/stop_critical_timings are called from arch/x86/kernel/process.c
>> in the cpu_idle loop function.
>>
>> Remove the ones in the cpuidle driver.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> For this one I need an ACK from Len.
> 
> Len, any objections?


Len ? ping ...

>> ---
>>  drivers/idle/intel_idle.c |    3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
>> index 5d66750..c99c31e 100644
>> --- a/drivers/idle/intel_idle.c
>> +++ b/drivers/idle/intel_idle.c
>> @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
>>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
>>  
>> -	stop_critical_timings();
>>  	if (!need_resched()) {
>>  
>>  		__monitor((void *)&current_thread_info()->flags, 0, 0);
>> @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
>>  			__mwait(eax, ecx);
>>  	}
>>  
>> -	start_critical_timings();
>> -
>>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
>>  
>>


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  * English - detected
  * English
  * French

  * English
  * French

 <javascript:void(0);> <#>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
  2013-04-07 20:52           ` Daniel Lezcano
@ 2013-04-08 17:40               ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-08 17:40 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-pm-u79uwXL29TY76Z2rM5mHXA, patches-QSEj5FYQhm4dnm+yROfE0A,
	nsekhar-l0cyMroinI0, rnayak-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	lenb-DgEjT+Ai2ygdnm+yROfE0A

On 04/07/2013 10:52 PM, Daniel Lezcano wrote:
> On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
>> On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
>>> The start/stop_critical_timings are called from arch/x86/kernel/process.c
>>> in the cpu_idle loop function.
>>>
>>> Remove the ones in the cpuidle driver.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> For this one I need an ACK from Len.
>>
>> Len, any objections?
>
> Len ? ping ...

Rafael,

this patch is not dependent from any patch in the series, is it possible
you apply the patchset except this patch ?

May be you can apply it later when Len acks it, or I can resend it, no ?

I have a lot of code consolidation patches awaiting for this patchset to
be merged.

Thanks
  -- Daniel

> ---
>  drivers/idle/intel_idle.c |    3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 5d66750..c99c31e 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
>  
> -	stop_critical_timings();
>  	if (!need_resched()) {
>  
>  		__monitor((void *)&current_thread_info()->flags, 0, 0);
> @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
>  			__mwait(eax, ecx);
>  	}
>  
> -	start_critical_timings();
> -
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
>  
>
>


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
@ 2013-04-08 17:40               ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-08 17:40 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/07/2013 10:52 PM, Daniel Lezcano wrote:
> On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
>> On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
>>> The start/stop_critical_timings are called from arch/x86/kernel/process.c
>>> in the cpu_idle loop function.
>>>
>>> Remove the ones in the cpuidle driver.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> For this one I need an ACK from Len.
>>
>> Len, any objections?
>
> Len ? ping ...

Rafael,

this patch is not dependent from any patch in the series, is it possible
you apply the patchset except this patch ?

May be you can apply it later when Len acks it, or I can resend it, no ?

I have a lot of code consolidation patches awaiting for this patchset to
be merged.

Thanks
  -- Daniel

> ---
>  drivers/idle/intel_idle.c |    3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 5d66750..c99c31e 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
>  
> -	stop_critical_timings();
>  	if (!need_resched()) {
>  
>  		__monitor((void *)&current_thread_info()->flags, 0, 0);
> @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
>  			__mwait(eax, ecx);
>  	}
>  
> -	start_critical_timings();
> -
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
>  
>
>


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
  2013-04-08 19:27                   ` Rafael J. Wysocki
@ 2013-04-08 19:27                     ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-08 19:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, deepthi, linaro-kernel, linux, swarren, linux-pm,
	patches, nsekhar, rnayak, josephl, linux-tegra, horms+renesas,
	linux-arm-kernel, lenb

On 04/08/2013 09:27 PM, Rafael J. Wysocki wrote:
> On Monday, April 08, 2013 07:40:37 PM Daniel Lezcano wrote:
>> On 04/07/2013 10:52 PM, Daniel Lezcano wrote:
>>> On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
>>>> On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
>>>>> The start/stop_critical_timings are called from arch/x86/kernel/process.c
>>>>> in the cpu_idle loop function.
>>>>>
>>>>> Remove the ones in the cpuidle driver.
>>>>>
>>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> For this one I need an ACK from Len.
>>>>
>>>> Len, any objections?
>>>
>>> Len ? ping ...
>>
>> Rafael,
>>
>> this patch is not dependent from any patch in the series, is it possible
>> you apply the patchset except this patch ?
>>
>> May be you can apply it later when Len acks it, or I can resend it, no ?
>>
>> I have a lot of code consolidation patches awaiting for this patchset to
>> be merged.
> 
> OK, I'll take the rest of your patches in this series (except for [1/9]
> which also is not depended on by anything AFAICS).

Thanks Rafael.

  -- Daniel

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
@ 2013-04-08 19:27                     ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-08 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/08/2013 09:27 PM, Rafael J. Wysocki wrote:
> On Monday, April 08, 2013 07:40:37 PM Daniel Lezcano wrote:
>> On 04/07/2013 10:52 PM, Daniel Lezcano wrote:
>>> On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
>>>> On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
>>>>> The start/stop_critical_timings are called from arch/x86/kernel/process.c
>>>>> in the cpu_idle loop function.
>>>>>
>>>>> Remove the ones in the cpuidle driver.
>>>>>
>>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> For this one I need an ACK from Len.
>>>>
>>>> Len, any objections?
>>>
>>> Len ? ping ...
>>
>> Rafael,
>>
>> this patch is not dependent from any patch in the series, is it possible
>> you apply the patchset except this patch ?
>>
>> May be you can apply it later when Len acks it, or I can resend it, no ?
>>
>> I have a lot of code consolidation patches awaiting for this patchset to
>> be merged.
> 
> OK, I'll take the rest of your patches in this series (except for [1/9]
> which also is not depended on by anything AFAICS).

Thanks Rafael.

  -- Daniel

-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
  2013-04-08 17:40               ` Daniel Lezcano
@ 2013-04-08 19:27                   ` Rafael J. Wysocki
  -1 siblings, 0 replies; 58+ messages in thread
From: Rafael J. Wysocki @ 2013-04-08 19:27 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Len Brown, deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-pm-u79uwXL29TY76Z2rM5mHXA, patches-QSEj5FYQhm4dnm+yROfE0A,
	nsekhar-l0cyMroinI0, rnayak-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	lenb-DgEjT+Ai2ygdnm+yROfE0A

On Monday, April 08, 2013 07:40:37 PM Daniel Lezcano wrote:
> On 04/07/2013 10:52 PM, Daniel Lezcano wrote:
> > On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
> >> On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
> >>> The start/stop_critical_timings are called from arch/x86/kernel/process.c
> >>> in the cpu_idle loop function.
> >>>
> >>> Remove the ones in the cpuidle driver.
> >>>
> >>> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> >> For this one I need an ACK from Len.
> >>
> >> Len, any objections?
> >
> > Len ? ping ...
> 
> Rafael,
> 
> this patch is not dependent from any patch in the series, is it possible
> you apply the patchset except this patch ?
> 
> May be you can apply it later when Len acks it, or I can resend it, no ?
> 
> I have a lot of code consolidation patches awaiting for this patchset to
> be merged.

OK, I'll take the rest of your patches in this series (except for [1/9]
which also is not depended on by anything AFAICS).

Thanks,
Rafael


> > ---
> >  drivers/idle/intel_idle.c |    3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> > index 5d66750..c99c31e 100644
> > --- a/drivers/idle/intel_idle.c
> > +++ b/drivers/idle/intel_idle.c
> > @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
> >  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
> >  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
> >  
> > -	stop_critical_timings();
> >  	if (!need_resched()) {
> >  
> >  		__monitor((void *)&current_thread_info()->flags, 0, 0);
> > @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
> >  			__mwait(eax, ecx);
> >  	}
> >  
> > -	start_critical_timings();
> > -
> >  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
> >  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
> >  
> >
> >
> 
> 
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
@ 2013-04-08 19:27                   ` Rafael J. Wysocki
  0 siblings, 0 replies; 58+ messages in thread
From: Rafael J. Wysocki @ 2013-04-08 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday, April 08, 2013 07:40:37 PM Daniel Lezcano wrote:
> On 04/07/2013 10:52 PM, Daniel Lezcano wrote:
> > On 04/05/2013 12:31 AM, Rafael J. Wysocki wrote:
> >> On Wednesday, April 03, 2013 02:15:20 PM Daniel Lezcano wrote:
> >>> The start/stop_critical_timings are called from arch/x86/kernel/process.c
> >>> in the cpu_idle loop function.
> >>>
> >>> Remove the ones in the cpuidle driver.
> >>>
> >>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> >> For this one I need an ACK from Len.
> >>
> >> Len, any objections?
> >
> > Len ? ping ...
> 
> Rafael,
> 
> this patch is not dependent from any patch in the series, is it possible
> you apply the patchset except this patch ?
> 
> May be you can apply it later when Len acks it, or I can resend it, no ?
> 
> I have a lot of code consolidation patches awaiting for this patchset to
> be merged.

OK, I'll take the rest of your patches in this series (except for [1/9]
which also is not depended on by anything AFAICS).

Thanks,
Rafael


> > ---
> >  drivers/idle/intel_idle.c |    3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> > index 5d66750..c99c31e 100644
> > --- a/drivers/idle/intel_idle.c
> > +++ b/drivers/idle/intel_idle.c
> > @@ -339,7 +339,6 @@ static int intel_idle(struct cpuidle_device *dev,
> >  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
> >  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
> >  
> > -	stop_critical_timings();
> >  	if (!need_resched()) {
> >  
> >  		__monitor((void *)&current_thread_info()->flags, 0, 0);
> > @@ -348,8 +347,6 @@ static int intel_idle(struct cpuidle_device *dev,
> >  			__mwait(eax, ecx);
> >  	}
> >  
> > -	start_critical_timings();
> > -
> >  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
> >  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
> >  
> >
> >
> 
> 
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/9] ARM: cpuidle: remove useless declaration
  2013-04-03 12:23   ` Daniel Lezcano
@ 2013-04-08 20:50     ` Rafael J. Wysocki
  -1 siblings, 0 replies; 58+ messages in thread
From: Rafael J. Wysocki @ 2013-04-08 20:50 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Russell King - ARM Linux, deepthi, linaro-kernel, swarren,
	patches, linux-pm, rnayak, nsekhar, josephl, linux-tegra,
	horms+renesas, linux-arm-kernel, lenb

On Wednesday, April 03, 2013 02:23:23 PM Daniel Lezcano wrote:
> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> > The noop functions code is not necessary because the header file is
> > included in files which are compiled when CONFIG_CPU_IDLE is on.
> >
> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> I have been involved in the development of this file. I know Rob is no
> longer working on this neither monitoring the code.
> 
> Russell are you ok with this patch ? Rafael needs your ack to take this
> patch into its tree.

Well, since nothing in the cpuidle directory seems to really depend on this
patch, my suggestion is to merge it through the ARM tree when suitable.

Thanks,
Rafael


> > ---
> >  arch/arm/include/asm/cpuidle.h |    7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
> > index 2fca60a..7367787 100644
> > --- a/arch/arm/include/asm/cpuidle.h
> > +++ b/arch/arm/include/asm/cpuidle.h
> > @@ -1,13 +1,8 @@
> >  #ifndef __ASM_ARM_CPUIDLE_H
> >  #define __ASM_ARM_CPUIDLE_H
> >  
> > -#ifdef CONFIG_CPU_IDLE
> >  extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> > -		struct cpuidle_driver *drv, int index);
> > -#else
> > -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> > -		struct cpuidle_driver *drv, int index) { return -ENODEV; }
> > -#endif
> > +				    struct cpuidle_driver *drv, int index);
> >  
> >  /* Common ARM WFI state */
> >  #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
> 
> 
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-08 20:50     ` Rafael J. Wysocki
  0 siblings, 0 replies; 58+ messages in thread
From: Rafael J. Wysocki @ 2013-04-08 20:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday, April 03, 2013 02:23:23 PM Daniel Lezcano wrote:
> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> > The noop functions code is not necessary because the header file is
> > included in files which are compiled when CONFIG_CPU_IDLE is on.
> >
> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> I have been involved in the development of this file. I know Rob is no
> longer working on this neither monitoring the code.
> 
> Russell are you ok with this patch ? Rafael needs your ack to take this
> patch into its tree.

Well, since nothing in the cpuidle directory seems to really depend on this
patch, my suggestion is to merge it through the ARM tree when suitable.

Thanks,
Rafael


> > ---
> >  arch/arm/include/asm/cpuidle.h |    7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
> > index 2fca60a..7367787 100644
> > --- a/arch/arm/include/asm/cpuidle.h
> > +++ b/arch/arm/include/asm/cpuidle.h
> > @@ -1,13 +1,8 @@
> >  #ifndef __ASM_ARM_CPUIDLE_H
> >  #define __ASM_ARM_CPUIDLE_H
> >  
> > -#ifdef CONFIG_CPU_IDLE
> >  extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> > -		struct cpuidle_driver *drv, int index);
> > -#else
> > -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
> > -		struct cpuidle_driver *drv, int index) { return -ENODEV; }
> > -#endif
> > +				    struct cpuidle_driver *drv, int index);
> >  
> >  /* Common ARM WFI state */
> >  #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
> 
> 
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/9] ARM: cpuidle: remove useless declaration
  2013-04-08 20:50     ` Rafael J. Wysocki
@ 2013-04-08 20:53       ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-08 20:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Russell King - ARM Linux, deepthi, linaro-kernel, swarren,
	patches, linux-pm, rnayak, nsekhar, josephl, linux-tegra,
	horms+renesas, linux-arm-kernel, lenb

On 04/08/2013 10:50 PM, Rafael J. Wysocki wrote:
> On Wednesday, April 03, 2013 02:23:23 PM Daniel Lezcano wrote:
>> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
>>> The noop functions code is not necessary because the header file is
>>> included in files which are compiled when CONFIG_CPU_IDLE is on.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>
>> I have been involved in the development of this file. I know Rob is no
>> longer working on this neither monitoring the code.
>>
>> Russell are you ok with this patch ? Rafael needs your ack to take this
>> patch into its tree.
> 
> Well, since nothing in the cpuidle directory seems to really depend on this
> patch, my suggestion is to merge it through the ARM tree when suitable.

Ok.


>>> ---
>>>  arch/arm/include/asm/cpuidle.h |    7 +------
>>>  1 file changed, 1 insertion(+), 6 deletions(-)
>>>
>>> diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
>>> index 2fca60a..7367787 100644
>>> --- a/arch/arm/include/asm/cpuidle.h
>>> +++ b/arch/arm/include/asm/cpuidle.h
>>> @@ -1,13 +1,8 @@
>>>  #ifndef __ASM_ARM_CPUIDLE_H
>>>  #define __ASM_ARM_CPUIDLE_H
>>>  
>>> -#ifdef CONFIG_CPU_IDLE
>>>  extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
>>> -		struct cpuidle_driver *drv, int index);
>>> -#else
>>> -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
>>> -		struct cpuidle_driver *drv, int index) { return -ENODEV; }
>>> -#endif
>>> +				    struct cpuidle_driver *drv, int index);
>>>  
>>>  /* Common ARM WFI state */
>>>  #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
>>
>>
>>


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-08 20:53       ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-08 20:53 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/08/2013 10:50 PM, Rafael J. Wysocki wrote:
> On Wednesday, April 03, 2013 02:23:23 PM Daniel Lezcano wrote:
>> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
>>> The noop functions code is not necessary because the header file is
>>> included in files which are compiled when CONFIG_CPU_IDLE is on.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>
>> I have been involved in the development of this file. I know Rob is no
>> longer working on this neither monitoring the code.
>>
>> Russell are you ok with this patch ? Rafael needs your ack to take this
>> patch into its tree.
> 
> Well, since nothing in the cpuidle directory seems to really depend on this
> patch, my suggestion is to merge it through the ARM tree when suitable.

Ok.


>>> ---
>>>  arch/arm/include/asm/cpuidle.h |    7 +------
>>>  1 file changed, 1 insertion(+), 6 deletions(-)
>>>
>>> diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
>>> index 2fca60a..7367787 100644
>>> --- a/arch/arm/include/asm/cpuidle.h
>>> +++ b/arch/arm/include/asm/cpuidle.h
>>> @@ -1,13 +1,8 @@
>>>  #ifndef __ASM_ARM_CPUIDLE_H
>>>  #define __ASM_ARM_CPUIDLE_H
>>>  
>>> -#ifdef CONFIG_CPU_IDLE
>>>  extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
>>> -		struct cpuidle_driver *drv, int index);
>>> -#else
>>> -static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
>>> -		struct cpuidle_driver *drv, int index) { return -ENODEV; }
>>> -#endif
>>> +				    struct cpuidle_driver *drv, int index);
>>>  
>>>  /* Common ARM WFI state */
>>>  #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
>>
>>
>>


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/9] ARM: cpuidle: remove useless declaration
  2013-04-03 12:23   ` Daniel Lezcano
@ 2013-04-18 14:13     ` Russell King - ARM Linux
  -1 siblings, 0 replies; 58+ messages in thread
From: Russell King - ARM Linux @ 2013-04-18 14:13 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rjw, deepthi, linaro-kernel, swarren, patches, linux-pm, rnayak,
	nsekhar, josephl, linux-tegra, horms+renesas, linux-arm-kernel,
	lenb

On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> > The noop functions code is not necessary because the header file is
> > included in files which are compiled when CONFIG_CPU_IDLE is on.
> >
> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> I have been involved in the development of this file. I know Rob is no
> longer working on this neither monitoring the code.
> 
> Russell are you ok with this patch ? Rafael needs your ack to take this
> patch into its tree.

I don't know - the description doesn't make it clear.  Surely, what you
checked was that this file is _not_ included in any file which is built
when CONFIG_CPU_IDLE is disabled.  In other words, when CONFIG_CPU_IDLE
is not defined, arm_cpuidle_simple_enter() is never referenced.

If that is the case, then it's just that the patch description is the
opposite of what it should be for this patch - and then the patch and
description match and I don't see any reason to say no to it.

Then comes the issue of who takes the patch.  It looks like Rafael
would like me to.  I'm fine with that, but it will need to go into the
patch system as I'm rather busy catching up with email, and I expect
to be catching up for at least the rest of this month.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-18 14:13     ` Russell King - ARM Linux
  0 siblings, 0 replies; 58+ messages in thread
From: Russell King - ARM Linux @ 2013-04-18 14:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> > The noop functions code is not necessary because the header file is
> > included in files which are compiled when CONFIG_CPU_IDLE is on.
> >
> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> I have been involved in the development of this file. I know Rob is no
> longer working on this neither monitoring the code.
> 
> Russell are you ok with this patch ? Rafael needs your ack to take this
> patch into its tree.

I don't know - the description doesn't make it clear.  Surely, what you
checked was that this file is _not_ included in any file which is built
when CONFIG_CPU_IDLE is disabled.  In other words, when CONFIG_CPU_IDLE
is not defined, arm_cpuidle_simple_enter() is never referenced.

If that is the case, then it's just that the patch description is the
opposite of what it should be for this patch - and then the patch and
description match and I don't see any reason to say no to it.

Then comes the issue of who takes the patch.  It looks like Rafael
would like me to.  I'm fine with that, but it will need to go into the
patch system as I'm rather busy catching up with email, and I expect
to be catching up for at least the rest of this month.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/9] ARM: cpuidle: remove useless declaration
  2013-04-18 14:13     ` Russell King - ARM Linux
@ 2013-04-18 14:31       ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-18 14:31 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: rjw, deepthi, linaro-kernel, swarren, patches, linux-pm, rnayak,
	nsekhar, josephl, linux-tegra, horms+renesas, linux-arm-kernel,
	lenb

On 04/18/2013 04:13 PM, Russell King - ARM Linux wrote:
> On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
>> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
>>> The noop functions code is not necessary because the header file is
>>> included in files which are compiled when CONFIG_CPU_IDLE is on.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>
>> I have been involved in the development of this file. I know Rob is no
>> longer working on this neither monitoring the code.
>>
>> Russell are you ok with this patch ? Rafael needs your ack to take this
>> patch into its tree.
> 
> I don't know - the description doesn't make it clear.  Surely, what you
> checked was that this file is _not_ included in any file which is built
> when CONFIG_CPU_IDLE is disabled.  In other words, when CONFIG_CPU_IDLE
> is not defined, arm_cpuidle_simple_enter() is never referenced.
> 
> If that is the case, then it's just that the patch description is the
> opposite of what it should be for this patch - and then the patch and
> description match and I don't see any reason to say no to it.
> 
> Then comes the issue of who takes the patch.  It looks like Rafael
> would like me to.

Actually Rafael was willing to take the patch if you ack it.


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-18 14:31       ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-18 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/18/2013 04:13 PM, Russell King - ARM Linux wrote:
> On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
>> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
>>> The noop functions code is not necessary because the header file is
>>> included in files which are compiled when CONFIG_CPU_IDLE is on.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>
>> I have been involved in the development of this file. I know Rob is no
>> longer working on this neither monitoring the code.
>>
>> Russell are you ok with this patch ? Rafael needs your ack to take this
>> patch into its tree.
> 
> I don't know - the description doesn't make it clear.  Surely, what you
> checked was that this file is _not_ included in any file which is built
> when CONFIG_CPU_IDLE is disabled.  In other words, when CONFIG_CPU_IDLE
> is not defined, arm_cpuidle_simple_enter() is never referenced.
> 
> If that is the case, then it's just that the patch description is the
> opposite of what it should be for this patch - and then the patch and
> description match and I don't see any reason to say no to it.
> 
> Then comes the issue of who takes the patch.  It looks like Rafael
> would like me to.

Actually Rafael was willing to take the patch if you ack it.


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/9] ARM: cpuidle: remove useless declaration
  2013-04-18 14:31       ` Daniel Lezcano
@ 2013-04-18 15:42         ` Russell King - ARM Linux
  -1 siblings, 0 replies; 58+ messages in thread
From: Russell King - ARM Linux @ 2013-04-18 15:42 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: deepthi, linaro-kernel, swarren, linux-pm, patches, nsekhar, rjw,
	rnayak, josephl, linux-tegra, horms+renesas, linux-arm-kernel,
	lenb

On Thu, Apr 18, 2013 at 04:31:43PM +0200, Daniel Lezcano wrote:
> On 04/18/2013 04:13 PM, Russell King - ARM Linux wrote:
> > On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
> >> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> >>> The noop functions code is not necessary because the header file is
> >>> included in files which are compiled when CONFIG_CPU_IDLE is on.
> >>>
> >>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> >>
> >> I have been involved in the development of this file. I know Rob is no
> >> longer working on this neither monitoring the code.
> >>
> >> Russell are you ok with this patch ? Rafael needs your ack to take this
> >> patch into its tree.
> > 
> > I don't know - the description doesn't make it clear.  Surely, what you
> > checked was that this file is _not_ included in any file which is built
> > when CONFIG_CPU_IDLE is disabled.  In other words, when CONFIG_CPU_IDLE
> > is not defined, arm_cpuidle_simple_enter() is never referenced.
> > 
> > If that is the case, then it's just that the patch description is the
> > opposite of what it should be for this patch - and then the patch and
> > description match and I don't see any reason to say no to it.
> > 
> > Then comes the issue of who takes the patch.  It looks like Rafael
> > would like me to.
> 
> Actually Rafael was willing to take the patch if you ack it.

Well, I want to see a proper description on the patch which describes
what it _is_ doing before I ack it.  The existing description is just
plain confusing.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-18 15:42         ` Russell King - ARM Linux
  0 siblings, 0 replies; 58+ messages in thread
From: Russell King - ARM Linux @ 2013-04-18 15:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 18, 2013 at 04:31:43PM +0200, Daniel Lezcano wrote:
> On 04/18/2013 04:13 PM, Russell King - ARM Linux wrote:
> > On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
> >> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
> >>> The noop functions code is not necessary because the header file is
> >>> included in files which are compiled when CONFIG_CPU_IDLE is on.
> >>>
> >>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> >>
> >> I have been involved in the development of this file. I know Rob is no
> >> longer working on this neither monitoring the code.
> >>
> >> Russell are you ok with this patch ? Rafael needs your ack to take this
> >> patch into its tree.
> > 
> > I don't know - the description doesn't make it clear.  Surely, what you
> > checked was that this file is _not_ included in any file which is built
> > when CONFIG_CPU_IDLE is disabled.  In other words, when CONFIG_CPU_IDLE
> > is not defined, arm_cpuidle_simple_enter() is never referenced.
> > 
> > If that is the case, then it's just that the patch description is the
> > opposite of what it should be for this patch - and then the patch and
> > description match and I don't see any reason to say no to it.
> > 
> > Then comes the issue of who takes the patch.  It looks like Rafael
> > would like me to.
> 
> Actually Rafael was willing to take the patch if you ack it.

Well, I want to see a proper description on the patch which describes
what it _is_ doing before I ack it.  The existing description is just
plain confusing.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/9] ARM: cpuidle: remove useless declaration
  2013-04-18 15:42         ` Russell King - ARM Linux
@ 2013-04-18 15:47             ` Daniel Lezcano
  -1 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-18 15:47 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	swarren-3lzwWm7+Weoh9ZMKESR00Q, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	patches-QSEj5FYQhm4dnm+yROfE0A, nsekhar-l0cyMroinI0,
	rjw-KKrjLPT3xs0, rnayak-l0cyMroinI0,
	josephl-DDmLM1+adcrQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	lenb-DgEjT+Ai2ygdnm+yROfE0A

On 04/18/2013 05:42 PM, Russell King - ARM Linux wrote:
> On Thu, Apr 18, 2013 at 04:31:43PM +0200, Daniel Lezcano wrote:
>> On 04/18/2013 04:13 PM, Russell King - ARM Linux wrote:
>>> On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
>>>> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
>>>>> The noop functions code is not necessary because the header file is
>>>>> included in files which are compiled when CONFIG_CPU_IDLE is on.
>>>>>
>>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>>>
>>>> I have been involved in the development of this file. I know Rob is no
>>>> longer working on this neither monitoring the code.
>>>>
>>>> Russell are you ok with this patch ? Rafael needs your ack to take this
>>>> patch into its tree.
>>>
>>> I don't know - the description doesn't make it clear.  Surely, what you
>>> checked was that this file is _not_ included in any file which is built
>>> when CONFIG_CPU_IDLE is disabled.  In other words, when CONFIG_CPU_IDLE
>>> is not defined, arm_cpuidle_simple_enter() is never referenced.
>>>
>>> If that is the case, then it's just that the patch description is the
>>> opposite of what it should be for this patch - and then the patch and
>>> description match and I don't see any reason to say no to it.
>>>
>>> Then comes the issue of who takes the patch.  It looks like Rafael
>>> would like me to.
>>
>> Actually Rafael was willing to take the patch if you ack it.
> 
> Well, I want to see a proper description on the patch which describes
> what it _is_ doing before I ack it.  The existing description is just
> plain confusing.

Ok, I will resend.

Thanks
  -- Daniel


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: cpuidle: remove useless declaration
@ 2013-04-18 15:47             ` Daniel Lezcano
  0 siblings, 0 replies; 58+ messages in thread
From: Daniel Lezcano @ 2013-04-18 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/18/2013 05:42 PM, Russell King - ARM Linux wrote:
> On Thu, Apr 18, 2013 at 04:31:43PM +0200, Daniel Lezcano wrote:
>> On 04/18/2013 04:13 PM, Russell King - ARM Linux wrote:
>>> On Wed, Apr 03, 2013 at 02:23:23PM +0200, Daniel Lezcano wrote:
>>>> On 04/03/2013 02:15 PM, Daniel Lezcano wrote:
>>>>> The noop functions code is not necessary because the header file is
>>>>> included in files which are compiled when CONFIG_CPU_IDLE is on.
>>>>>
>>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>>
>>>> I have been involved in the development of this file. I know Rob is no
>>>> longer working on this neither monitoring the code.
>>>>
>>>> Russell are you ok with this patch ? Rafael needs your ack to take this
>>>> patch into its tree.
>>>
>>> I don't know - the description doesn't make it clear.  Surely, what you
>>> checked was that this file is _not_ included in any file which is built
>>> when CONFIG_CPU_IDLE is disabled.  In other words, when CONFIG_CPU_IDLE
>>> is not defined, arm_cpuidle_simple_enter() is never referenced.
>>>
>>> If that is the case, then it's just that the patch description is the
>>> opposite of what it should be for this patch - and then the patch and
>>> description match and I don't see any reason to say no to it.
>>>
>>> Then comes the issue of who takes the patch.  It looks like Rafael
>>> would like me to.
>>
>> Actually Rafael was willing to take the patch if you ack it.
> 
> Well, I want to see a proper description on the patch which describes
> what it _is_ doing before I ack it.  The existing description is just
> plain confusing.

Ok, I will resend.

Thanks
  -- Daniel


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
  2013-04-03 12:15   ` Daniel Lezcano
@ 2013-04-19 22:02       ` Len Brown
  -1 siblings, 0 replies; 58+ messages in thread
From: Len Brown @ 2013-04-19 22:02 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rjw-KKrjLPT3xs0, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	patches-QSEj5FYQhm4dnm+yROfE0A,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, rnayak-l0cyMroinI0,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ,
	santosh.shilimkar-l0cyMroinI0, arnd-r2nGTMty4D4,
	nsekhar-l0cyMroinI0, josephl-DDmLM1+adcrQT0dZR+AlfA,
	deepthi-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

On 04/03/2013 08:15 AM, Daniel Lezcano wrote:
> The start/stop_critical_timings are called from arch/x86/kernel/process.c
> in the cpu_idle loop function.
> 
> Remove the ones in the cpuidle driver.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Acked-by: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 7/9] intel: cpuidle: remove stop/start critical timings
@ 2013-04-19 22:02       ` Len Brown
  0 siblings, 0 replies; 58+ messages in thread
From: Len Brown @ 2013-04-19 22:02 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/03/2013 08:15 AM, Daniel Lezcano wrote:
> The start/stop_critical_timings are called from arch/x86/kernel/process.c
> in the cpu_idle loop function.
> 
> Remove the ones in the cpuidle driver.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Acked-by: Len Brown <len.brown@intel.com>

^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2013-04-19 22:02 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-03 12:15 [PATCH 1/9] ARM: cpuidle: remove useless declaration Daniel Lezcano
2013-04-03 12:15 ` Daniel Lezcano
     [not found] ` <1364991322-20585-1-git-send-email-daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-04-03 12:15   ` [PATCH 2/9] ARM: shmobile: pm: fix init sections Daniel Lezcano
2013-04-03 12:15     ` Daniel Lezcano
2013-04-03 12:15   ` [PATCH 3/9] ARM: shmobile: cpuidle: remove useless WFI function Daniel Lezcano
2013-04-03 12:15     ` Daniel Lezcano
2013-04-03 12:15   ` [PATCH 6/9] ARM: davinci: cpuidle: fix wrong enter function Daniel Lezcano
2013-04-03 12:15     ` Daniel Lezcano
2013-04-04  7:16     ` Sekhar Nori
2013-04-04  7:16       ` Sekhar Nori
2013-04-03 12:15   ` [PATCH 9/9] POWERPC: pseries: cpuidle: use time keeping flag Daniel Lezcano
2013-04-03 12:15     ` Daniel Lezcano
     [not found]     ` <1364991322-20585-9-git-send-email-daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-04-03 14:25       ` Daniel Lezcano
2013-04-03 14:25         ` Daniel Lezcano
2013-04-04 11:01         ` Deepthi Dharwar
2013-04-04 11:01           ` Deepthi Dharwar
2013-04-04 22:30   ` [PATCH 1/9] ARM: cpuidle: remove useless declaration Rafael J. Wysocki
2013-04-04 22:30     ` Rafael J. Wysocki
2013-04-03 12:15 ` [PATCH 4/9] ARM: tegra2: cpuidle: change driver initialization Daniel Lezcano
2013-04-03 12:15   ` Daniel Lezcano
2013-04-03 12:15 ` [PATCH 5/9] ARM: tegra: cpuidle: remove useless initialization Daniel Lezcano
2013-04-03 12:15   ` Daniel Lezcano
2013-04-03 12:15 ` [PATCH 7/9] intel: cpuidle: remove stop/start critical timings Daniel Lezcano
2013-04-03 12:15   ` Daniel Lezcano
     [not found]   ` <1364991322-20585-7-git-send-email-daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-04-04 22:31     ` Rafael J. Wysocki
2013-04-04 22:31       ` Rafael J. Wysocki
     [not found]       ` <3375360.P4DAA9Jd5Y-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2013-04-07 20:52         ` Daniel Lezcano
2013-04-07 20:52           ` Daniel Lezcano
     [not found]           ` <5161DC9C.3020703-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-04-08 17:40             ` Daniel Lezcano
2013-04-08 17:40               ` Daniel Lezcano
     [not found]               ` <51630115.6040205-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-04-08 19:27                 ` Rafael J. Wysocki
2013-04-08 19:27                   ` Rafael J. Wysocki
2013-04-08 19:27                   ` Daniel Lezcano
2013-04-08 19:27                     ` Daniel Lezcano
2013-04-19 22:02     ` Len Brown
2013-04-19 22:02       ` Len Brown
2013-04-03 12:15 ` [PATCH 8/9] ARM: omap3: cpuidle: enable time keeping Daniel Lezcano
2013-04-03 12:15   ` Daniel Lezcano
2013-04-03 17:47   ` Kevin Hilman
2013-04-03 17:47     ` Kevin Hilman
     [not found]     ` <87zjxfzetw.fsf-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-04-03 20:49       ` Daniel Lezcano
2013-04-03 20:49         ` Daniel Lezcano
     [not found]         ` <515C95BF.6030103-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-04-03 21:43           ` Kevin Hilman
2013-04-03 21:43             ` Kevin Hilman
2013-04-03 12:23 ` [PATCH 1/9] ARM: cpuidle: remove useless declaration Daniel Lezcano
2013-04-03 12:23   ` Daniel Lezcano
2013-04-08 20:50   ` Rafael J. Wysocki
2013-04-08 20:50     ` Rafael J. Wysocki
2013-04-08 20:53     ` Daniel Lezcano
2013-04-08 20:53       ` Daniel Lezcano
2013-04-18 14:13   ` Russell King - ARM Linux
2013-04-18 14:13     ` Russell King - ARM Linux
2013-04-18 14:31     ` Daniel Lezcano
2013-04-18 14:31       ` Daniel Lezcano
2013-04-18 15:42       ` Russell King - ARM Linux
2013-04-18 15:42         ` Russell King - ARM Linux
     [not found]         ` <20130418154236.GY14496-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-04-18 15:47           ` Daniel Lezcano
2013-04-18 15:47             ` Daniel Lezcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.