ARM: cpuidle: remove useless declaration
Subsystems (8)
PATCH 1/9 ARM: cpuidle: remove useless declaration
The noop functions code is not necessary because the header file is included in files which are compiled when CONFIG_CPU_IDLE is on.
--- arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/include/asm/cpuidle.h +1 -6
@@ -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) {\
Signature · 1 line
1.7.9.5
PATCH 1/9 ARM: cpuidle: remove useless declaration
Quoted 4 lines · Daniel Lezcano
The noop functions code is not necessary because the header file is included in files which are compiled when
CONFIG_CPU_IDLEis on.Signed-off-by Daniel Lezcano <[email protected]>
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
Quoted 23 lines
--- arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)arch/arm/include/asm/cpuidle.h +1
-6@@ -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) {\
Signature · 5 lines
<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
PATCH 1/9 ARM: cpuidle: remove useless declaration
Quoted 11 lines · Daniel Lezcano
Quoted 4 lines · Daniel Lezcano
The noop functions code is not necessary because the header file is included in files which are compiled when
CONFIG_CPU_IDLEis on.Signed-off-by Daniel Lezcano <[email protected]>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
Quoted 26 lines
Quoted 23 lines
--- arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)arch/arm/include/asm/cpuidle.h +1
-6@@ -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) {\
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/9 ARM: cpuidle: remove useless declaration
Quoted 7 lines · Rafael J. Wysocki
Quoted 6 lines · Daniel Lezcano
Quoted 4 lines · Daniel Lezcano
The noop functions code is not necessary because the header file is included in files which are compiled when
CONFIG_CPU_IDLEis on.Signed-off-by Daniel Lezcano <[email protected]>
Quoted 8 lines
Quoted 5 lines
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.
Quoted 26 lines
Quoted 26 lines
Quoted 23 lines
--- arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)arch/arm/include/asm/cpuidle.h +1
-6@@ -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) {\
Signature · 5 lines
<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
PATCH 1/9 ARM: cpuidle: remove useless declaration
In reply to Daniel LezcanoQuoted 11 lines · Daniel Lezcano
Quoted 4 lines · Daniel Lezcano
The noop functions code is not necessary because the header file is included in files which are compiled when
CONFIG_CPU_IDLEis on.Signed-off-by Daniel Lezcano <[email protected]>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.
PATCH 1/9 ARM: cpuidle: remove useless declaration
Quoted 18 lines · Russell King - ARM Linux
Quoted 11 lines · Daniel Lezcano
Quoted 4 lines · Daniel Lezcano
The noop functions code is not necessary because the header file is included in files which are compiled when
CONFIG_CPU_IDLEis on.Signed-off-by Daniel Lezcano <[email protected]>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_IDLEis disabled. In other words, whenCONFIG_CPU_IDLEis not defined,arm_cpuidle_simple_enter()is never referenced.
Quoted 6 lines
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.
Signature · 5 lines
<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
PATCH 1/9 ARM: cpuidle: remove useless declaration
Quoted 19 lines · Daniel Lezcano
Quoted 18 lines · Russell King - ARM Linux
Quoted 11 lines · Daniel Lezcano
Quoted 4 lines · Daniel Lezcano
The noop functions code is not necessary because the header file is included in files which are compiled when
CONFIG_CPU_IDLEis on.Signed-off-by Daniel Lezcano <[email protected]>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_IDLEis disabled. In other words, whenCONFIG_CPU_IDLEis not defined,arm_cpuidle_simple_enter()is never referenced.
Quoted 8 lines
Quoted 6 lines
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.
PATCH 1/9 ARM: cpuidle: remove useless declaration
Quoted 24 lines · Russell King - ARM Linux
Quoted 23 lines · Daniel Lezcano
Quoted 22 lines · Russell King - ARM Linux
Quoted 11 lines · Daniel Lezcano
Quoted 4 lines · Daniel Lezcano
The noop functions code is not necessary because the header file is included in files which are compiled when
CONFIG_CPU_IDLEis on.Signed-off-by Daniel Lezcano <[email protected]>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_IDLEis disabled. In other words, whenCONFIG_CPU_IDLEis 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.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
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
Signature · 5 lines
<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
PATCH 2/9 ARM: shmobile: pm: fix init sections
In reply to Daniel LezcanoAdd the __init section for the functions which are called at init time.
--- arch/arm/mach-shmobile/cpuidle.c | 4 ++-- arch/arm/mach-shmobile/pm-sh7372.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-shmobile/cpuidle.c +2 -2
@@ -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;
arch/arm/mach-shmobile/pm-sh7372.c +2 -2
@@ -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
Signature · 1 line
1.7.9.5
PATCH 3/9 ARM: shmobile: cpuidle: remove useless WFI function
In reply to Daniel LezcanoRemove 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.
--- arch/arm/mach-shmobile/cpuidle.c | 8 -------- 1 file changed, 8 deletions(-)
arch/arm/mach-shmobile/cpuidle.c +0 -8
@@ -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 , };
Signature · 1 line
1.7.9.5
PATCH 4/9 ARM: tegra2: cpuidle: change driver initialization
In reply to Daniel LezcanoInitialize the idle states directly in the driver structure.
That prevents extra structure declaration and memcpy at init time.
--- arch/arm/mach-tegra/cpuidle-tegra20.c | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-)
arch/arm/mach-tegra/cpuidle-tegra20.c +20 -20
@@ -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" );
Signature · 1 line
1.7.9.5
PATCH 5/9 ARM: tegra: cpuidle: remove useless initialization
In reply to Daniel Lezcanodev->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.
--- 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(-)
arch/arm/mach-tegra/cpuidle-tegra114.c +0 -1
@@ -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",
arch/arm/mach-tegra/cpuidle-tegra20.c +0 -1
@@ -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",
arch/arm/mach-tegra/cpuidle-tegra30.c +0 -1
@@ -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",
Signature · 1 line
1.7.9.5
PATCH 6/9 ARM: davinci: cpuidle: fix wrong enter function
In reply to Daniel LezcanoThe 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.
--- arch/arm/mach-davinci/cpuidle.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
arch/arm/mach-davinci/cpuidle.c +2 -6
@@ -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;
Signature · 1 line
1.7.9.5
PATCH 6/9 ARM: davinci: cpuidle: fix wrong enter function
Quoted 11 lines · Daniel Lezcano
The
davinci_enter_idleis called from the cpuidle with thecpuidle_wrap_enterfunction. This one does the time compution for entering and exiting the idle function and then we call againcpuidle_wrap_enterforcpu_do_idle. This is wrong, we are calling recursivelycpuidle_wrap_enterfor nothing and furthermore reenabling the local irq.Remove this and replace it by the
cpu_do_idlefunction.Signed-off-by Daniel Lezcano <[email protected]>
Thanks,
Sekhar
PATCH 7/9 intel: cpuidle: remove stop/start critical timings
In reply to Daniel LezcanoThe 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.
--- drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)
drivers/idle/intel_idle.c +0 -3
@@ -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 *)¤t_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);
Signature · 1 line
1.7.9.5
PATCH 7/9 intel: cpuidle: remove stop/start critical timings
Quoted 6 lines · Daniel Lezcano
The start/stop_critical_timings are called from
arch/x86/kernel/process.cin thecpu_idleloop function.Remove the ones in the cpuidle driver.
Signed-off-by Daniel Lezcano <[email protected]>
For this one I need an ACK from Len.
Len, any objections?
Rafael
Quoted 26 lines
--- drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)drivers/idle/intel_idle.c +0
-3@@ -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 *)¤t_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);
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 7/9 intel: cpuidle: remove stop/start critical timings
Quoted 11 lines · Rafael J. Wysocki
Quoted 6 lines · Daniel Lezcano
The start/stop_critical_timings are called from
arch/x86/kernel/process.cin thecpu_idleloop function.Remove the ones in the cpuidle driver.
Signed-off-by Daniel Lezcano <[email protected]>For this one I need an ACK from Len.
Len, any objections?
Len ? ping ...
Quoted 26 lines
Quoted 26 lines
--- drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)drivers/idle/intel_idle.c +0
-3@@ -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 *)¤t_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);
Signature · 14 lines
<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);> <#>
PATCH 7/9 intel: cpuidle: remove stop/start critical timings
Quoted 5 lines · Daniel Lezcano
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Daniel Lezcano
The start/stop_critical_timings are called from
arch/x86/kernel/process.cin thecpu_idleloop function.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Remove the ones in the cpuidle driver.
Signed-off-by Daniel Lezcano <[email protected]>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
Quoted 27 lines
--- drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)drivers/idle/intel_idle.c +0
-3@@ -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 *)¤t_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);
Signature · 5 lines
<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
PATCH 7/9 intel: cpuidle: remove stop/start critical timings
Quoted 17 lines · Daniel Lezcano
Quoted 5 lines · Daniel Lezcano
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Daniel Lezcano
The start/stop_critical_timings are called from
arch/x86/kernel/process.cin thecpu_idleloop function.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Remove the ones in the cpuidle driver.
Signed-off-by Daniel Lezcano <[email protected]>For this one I need an ACK from Len.
Len, any objections?
Len ? ping ...
Rafael,
Quoted 7 lines
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
Quoted 30 lines
Quoted 27 lines
--- drivers/idle/intel_idle.c | 3 --- 1 file changed, 3 deletions(-)drivers/idle/intel_idle.c +0
-3@@ -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 *)¤t_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);
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 7/9 intel: cpuidle: remove stop/start critical timings
Quoted 21 lines · Rafael J. Wysocki
Quoted 20 lines · Daniel Lezcano
Quoted 5 lines · Daniel Lezcano
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Daniel Lezcano
The start/stop_critical_timings are called from
arch/x86/kernel/process.cin thecpu_idleloop function.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Remove the ones in the cpuidle driver.
Signed-off-by Daniel Lezcano <[email protected]>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 ?
Quoted 7 lines
Quoted 4 lines
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
Signature · 5 lines
<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
Len Brown
reviewerPATCH 7/9 intel: cpuidle: remove stop/start critical timings
In reply to Daniel LezcanoQuoted 6 lines · Daniel Lezcano
The start/stop_critical_timings are called from
arch/x86/kernel/process.cin thecpu_idleloop function.Remove the ones in the cpuidle driver.
Signed-off-by Daniel Lezcano <[email protected]>
PATCH 8/9 ARM: omap3: cpuidle: enable time keeping
In reply to Daniel LezcanoThe 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.
--- arch/arm/mach-omap2/cpuidle34xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/cpuidle34xx.c +3 -2
@@ -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,
Signature · 1 line
1.7.9.5
PATCH 8/9 ARM: omap3: cpuidle: enable time keeping
Quoted 8 lines · Daniel Lezcano
The
TIME_VALIDflag 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_irqenflag to activate it.Signed-off-by Daniel Lezcano <[email protected]>
Also, is this a regression fix that also needs to hit v3.9?
Kevin
Quoted 20 lines
--- arch/arm/mach-omap2/cpuidle34xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-omap2/cpuidle34xx.c +3
-2@@ -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,
PATCH 8/9 ARM: omap3: cpuidle: enable time keeping
Quoted 6 lines · Kevin Hilman
Quoted 4 lines · Daniel Lezcano
The
TIME_VALIDflag is specified for the different states but the time residency computation is not done, no tk flag, no time computation in the idle function.
Quoted 8 lines
Quoted 4 lines
Set the
en_core_tk_irqenflag to activate it.Signed-off-by Daniel Lezcano <[email protected]>Acked-by Kevin Hilman <[email protected]>Also, is this a regression fix that also needs to hit v3.9?
Yes, I think so.
Quoted 20 lines
Quoted 20 lines
--- arch/arm/mach-omap2/cpuidle34xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-omap2/cpuidle34xx.c +3
-2@@ -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,
Signature · 5 lines
<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
PATCH 8/9 ARM: omap3: cpuidle: enable time keeping
Quoted 9 lines · Daniel Lezcano
Quoted 8 lines · Kevin Hilman
Quoted 6 lines · Daniel Lezcano
The
TIME_VALIDflag 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_irqenflag to activate it.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Signed-off-by Daniel Lezcano <[email protected]>Acked-by Kevin Hilman <[email protected]>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
PATCH 9/9 POWERPC: pseries: cpuidle: use time keeping flag
In reply to Daniel LezcanoThe 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.
--- arch/powerpc/platforms/pseries/processor_idle.c | 35 ++++++++++------------- 1 file changed, 15 insertions(+), 20 deletions(-)
arch/powerpc/platforms/pseries/processor_idle.c +15 -20
@@ -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; }
Signature · 1 line
1.7.9.5
PATCH 9/9 POWERPC: pseries: cpuidle: use time keeping flag
Quoted 8 lines · Daniel Lezcano
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 <[email protected]>Signed-off-by Deepthi Dharwar <[email protected]>---
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
Quoted 113 lines
arch/powerpc/platforms/pseries/processor_idle.c | 35 ++++++++++------------- 1 file changed, 15 insertions(+), 20 deletions(-)arch/powerpc/platforms/pseries/processor_idle.c +15
-20@@ -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; }
Signature · 5 lines
<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
PATCH 9/9 POWERPC: pseries: cpuidle: use time keeping flag
Quoted 12 lines · Daniel Lezcano
Quoted 8 lines · Daniel Lezcano
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 <[email protected]>Signed-off-by Deepthi Dharwar <[email protected]>---
Rafael,
Quoted 7 lines
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
Quoted 115 lines
Quoted 113 lines
arch/powerpc/platforms/pseries/processor_idle.c | 35 ++++++++++------------- 1 file changed, 15 insertions(+), 20 deletions(-)arch/powerpc/platforms/pseries/processor_idle.c +15
-20@@ -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; }
PATCH 1/9 ARM: cpuidle: remove useless declaration
In reply to Daniel LezcanoQuoted 4 lines · Daniel Lezcano
The noop functions code is not necessary because the header file is included in files which are compiled when
CONFIG_CPU_IDLEis on.Signed-off-by Daniel Lezcano <[email protected]>
I need an ACK for this one.
Thanks,
Rafael
Quoted 24 lines
--- arch/arm/include/asm/cpuidle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)arch/arm/include/asm/cpuidle.h +1
-6@@ -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) {\
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.