ARM: cpuidle: remove useless declaration
Subsystems (7)
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 2/9 ARM: shmobile: pm: fix init sections
Add 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: OMAP4: cpuidle: fix wrong driver initialization
In reply to Daniel LezcanoThe driver is initialized several times. This is wrong and if the return code of the function was checked, it will return -EINVAL.
Move this initialization out of the loop.
--- arch/arm/mach-omap2/cpuidle44xx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/cpuidle44xx.c +7 -2
@@ -210,6 +210,7 @@ int __init omap4_idle_init(void) {struct cpuidle_device *dev;unsigned int cpu_id =0 ; +int ret; mpu_pd =pwrdm_lookup ("mpu_pwrdm" ); cpu_pd[0 ] =pwrdm_lookup ("cpu0_pwrdm" );
@@ -222,14 +223,18 @@ int __init omap4_idle_init(void)if (!cpu_clkdm[0 ] || !cpu_clkdm[1 ])return -ENODEV ; + ret =cpuidle_register_driver (&omap4_idle_driver); +if (ret) { +printk (KERN_ERR "failed to register the idle driver\n" ); +return ret; + } +for_each_cpu (cpu_id, cpu_online_mask) { dev = &per_cpu (omap4_idle_dev, cpu_id); dev->cpu = cpu_id;#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED dev->coupled_cpus = *cpu_online_mask;#endif -cpuidle_register_driver (&omap4_idle_driver); -if (cpuidle_register_device (dev)) {pr_err ("%s: CPUidle register failed\n" , __func__);return -EIO ;
Signature · 1 line
1.7.9.5
PATCH 4/9 ARM: OMAP4: cpuidle: fix wrong driver initialization
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Regards,
Santosh
PATCH 4/9 ARM: OMAP4: cpuidle: fix wrong driver initialization
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Any idea to simplify the cpuidle consolidation and maintenance ?
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 4/9 ARM: OMAP4: cpuidle: fix wrong driver initialization
Quoted 16 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Quoted 9 lines
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Any idea to simplify the cpuidle consolidation and maintenance ?
Fisrtly patches get posted to right mailing list based on where the code resides. So one must keep a watch on LAKML for the patches.
Talking specific to OMAP idle code, there is plan to move to drivers/idle/* but for that to happen there are some PRM/CM dependency for which also driver movement is planned. Once that happen, OMAP idle will find its way in drivers/idle/*
PATCH 4/9 ARM: OMAP4: cpuidle: fix wrong driver initialization
Quoted 21 lines · Santosh Shilimkar
Quoted 20 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Quoted 7 lines
Quoted 5 lines
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Any idea to simplify the cpuidle consolidation and maintenance ?
Fisrtly patches get posted to right mailing list based on where the code resides. So one must keep a watch on LAKML for the patches.
Yes, I agree.
The main issue is the multiple tree for the different drivers making hard to track, modify and improve the drivers in one shot.
It is not the first time, a modification of the cpuidle framework implied to modify all the drivers.
When Rob introduced the first code consolidation, that took months to add a simple flag in the drivers because we had to wait for the merge before the changes in drivers/cpuidle/cpuidle.c were visible.
Quoted 4 lines
Talking specific to OMAP idle code, there is plan to move to
drivers/idle/*but for that to happen there are some PRM/CM dependency for which also driver movement is planned. Once that happen, OMAP idle will find its way indrivers/idle/*
That would be *really* great. If we can do that for all the drivers, that will solve the multi-location / multi-tree problem.
The u8500 driver will be moved soon to this directory also.
I did some modifications around the at91 some months ago to encapsulate the code more, maybe it could be also a good candidate. Nicolas ?
For OMAP3 that could be a bit more difficult. Who is maintaining the driver now ?
I Cc'ed the different maintainers for the other boards, may be they can react ?
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 4/9 ARM: OMAP4: cpuidle: fix wrong driver initialization
Quoted 2 lines · Daniel Lezcano
Quoted 1 line · Santosh Shilimkar
On Friday 29 March 2013 04:15 PM, Daniel Lezcano wrote:
[..]
Quoted 3 lines
For OMAP3 that could be a bit more difficult. Who is maintaining the driver now ?
The driver is still maintained by Kevin Hilman and quite a few us keep that driver upto date. OMAP3 idle is movable as well. A while back I have assessed move of OMAP3 and OMAP4 idle drivers, and the only issue was the other PRM/CM dependency.
Regards,
Santosh
PATCH 4/9 ARM: OMAP4: cpuidle: fix wrong driver initialization
In reply to Daniel LezcanoQuoted 16 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Quoted 8 lines
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Any idea to simplify the cpuidle consolidation and maintenance ?
Adding Arnd and Olof to this discussion since atleast the ARM drivers go through their arm-soc tree.
Given the work you're putting in to consolidate the drivers, perhaps they can insist that idle drivers get acked by you?
/Amit
PATCH 4/9 ARM: OMAP4: cpuidle: fix wrong driver initialization
Quoted 25 lines · Amit Kucheria
Quoted 23 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Quoted 8 lines
Quoted 1 line
Any idea to simplify the cpuidle consolidation and maintenance ?
Adding Arnd and Olof to this discussion since atleast the ARM drivers go through their arm-soc tree.
Given the work you're putting in to consolidate the drivers, perhaps they can insist that idle drivers get acked by you?
Not to create controversy but as a general rule there is nothing like *insisting* ack on patches for merge apart from the official maintainers(gate keepers).
Having said that, its always good to get more reviews and acks so that better code gets merged.
This just my personal opinion.
Regards,
Santosh
PATCH 4/9 ARM: OMAP4: cpuidle: fix wrong driver initialization
Quoted 34 lines · Santosh Shilimkar
Quoted 25 lines · Amit Kucheria
Quoted 23 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Quoted 8 lines
Quoted 1 line
Any idea to simplify the cpuidle consolidation and maintenance ?
Adding Arnd and Olof to this discussion since atleast the ARM drivers go through their arm-soc tree.
Given the work you're putting in to consolidate the drivers, perhaps they can insist that idle drivers get acked by you?
Quoted 8 lines
Not to create controversy but as a general rule there is nothing like *insisting* ack on patches for merge apart from the official maintainers(gate keepers).
Having said that, its always good to get more reviews and acks so that better code gets merged.
This just my personal opinion.
I'm not asking for special treatment here. :) I'm requesting one set of maintainers (arm-soc maintainers) to push back on changes that don't get platform idle drivers in sync with the consolidation work that is currently ongoing.
This will speed up the process since it is hard to track every SoC-specific list for these changes. Some platform maintainers might not even be aware of it (those that Daniel hasn't modified yet). A similar approach seems to have worked for common clock, DT, pinmux, etc.
/Amit
PATCH 4/9 ARM: OMAP4: cpuidle: fix wrong driver initialization
Quoted 50 lines · Amit Kucheria
Quoted 34 lines · Santosh Shilimkar
Quoted 25 lines · Amit Kucheria
Quoted 23 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Quoted 8 lines
Quoted 1 line
Any idea to simplify the cpuidle consolidation and maintenance ?
Adding Arnd and Olof to this discussion since atleast the ARM drivers go through their arm-soc tree.
Given the work you're putting in to consolidate the drivers, perhaps they can insist that idle drivers get acked by you?
Quoted 8 lines
Not to create controversy but as a general rule there is nothing like *insisting* ack on patches for merge apart from the official maintainers(gate keepers).
Having said that, its always good to get more reviews and acks so that better code gets merged.
This just my personal opinion.
I'm not asking for special treatment here. :) I'm requesting one set of maintainers (arm-soc maintainers) to push back on changes that don't get platform idle drivers in sync with the consolidation work that is currently ongoing.
Quoted 6 lines
This will speed up the process since it is hard to track every SoC-specific list for these changes. Some platform maintainers might not even be aware of it (those that Daniel hasn't modified yet). A similar approach seems to have worked for common clock, DT, pinmux, etc.
Every patch gets pulled into arm-soc/arm-core has to be posted on LAKML. So as long as everybody follows that rule, there is no need to track every SoC lists. And what I have seen so far every this rule has been followed well.
Regards,
Santosh
How to facilitate the cpuidle drivers to go to the same direction (Was: Re: [PATCH 4/9] ARM: OMAP4: cpuidle: fix wrong driver initialization)
Quoted 57 lines · Santosh Shilimkar
Quoted 50 lines · Amit Kucheria
Quoted 34 lines · Santosh Shilimkar
Quoted 25 lines · Amit Kucheria
Quoted 23 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Quoted 8 lines
Quoted 1 line
Any idea to simplify the cpuidle consolidation and maintenance ?
Adding Arnd and Olof to this discussion since atleast the ARM drivers go through their arm-soc tree.
Given the work you're putting in to consolidate the drivers, perhaps they can insist that idle drivers get acked by you?
Quoted 8 lines
Not to create controversy but as a general rule there is nothing like *insisting* ack on patches for merge apart from the official maintainers(gate keepers).
Having said that, its always good to get more reviews and acks so that better code gets merged.
This just my personal opinion.
I'm not asking for special treatment here. :) I'm requesting one set of maintainers (arm-soc maintainers) to push back on changes that don't get platform idle drivers in sync with the consolidation work that is currently ongoing.
Quoted 6 lines
This will speed up the process since it is hard to track every SoC-specific list for these changes. Some platform maintainers might not even be aware of it (those that Daniel hasn't modified yet). A similar approach seems to have worked for common clock, DT, pinmux, etc.
Quoted 4 lines
Every patch gets pulled into arm-soc/arm-core has to be posted on LAKML. So as long as everybody follows that rule, there is no need to track every SoC lists. And what I have seen so far every this rule has been followed well.
(Added Benjamin, Deepthi and Paul)
I don't think everybody is following this rule, patches go to the SoC maintainer's tree without sometimes going through lakml.
Furthermore, there is not only ARM, there is also acpi_idle, intel_idle, pseries_idle and sh_idle, respectively located in:
drivers/acpi/processor_idle.cdrivers/acpi/processor_driver.cdrivers/idle/intel_idle.c
These ones above are under linux-pm, that is Rafael, like cpuidle, even if it is not marked in the MAINTAINERS file, so that should be ok.
And there is also:
arch/sh/kernel/cpu/shmobile/cpuidle.carch/powerpc/platforms/pseries/processor_idle.c
And hopefully, some others in the right place, calxeda_idle and kirwood_idle located in drivers/cpuidle.
In the maintainer file, there is no information about cpuidle at all.
For example, if someone modify the cpuidle framework allowing to consolidate the code across the different drivers, we have to wait for the merge before using the new api into the different drivers. If we follow strictly the path of the merge tree we fall into a scenario where consolidating the drivers takes a loooooong time.
Quoted 1 line
From my POV, *all* the cpuidle drivers must go under
drivers/cpuidle,
like cpufreq and pass through a single entry point to apply the patches, so the cpuidle framework and the drivers are always synced.
If everyone agree and we reach this consensus, then we can work to move these drivers to a single place.
I think Amit was suggesting to Cc me in the meantime, so while we are moving these drivers to this place, I can help to ensure we go to the same direction.
For example, Arnd Cc'ed me about the zynq cpuidle driver when it has been posted and, after review, it appeared it was totally obsolete wrt the modifications we did this year.
I propose first to add an entry in MAINTAINERS:
MAINTAINERS +8 -0
@@ -2206,6 +2206,15 @@ S: Maintained F: drivers/cpufreq/ F: include/linux/cpufreq.h +CPU IDLE DRIVERS +M: Rafael J. Wysocki <[email protected]> +L: cpuidle at vger.kernel.org +L: linux-pm at vger.kernel.org +S: Maintained +F: drivers/cpuidle/ +F: include/linux/cpuidle.h + CPUID/MSR DRIVER M: "H. Peter Anvin" <[email protected]> S: Maintained
Does it make sense ?
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
How to facilitate the cpuidle drivers to go to the same direction (Was: Re: [PATCH 4/9] ARM: OMAP4: cpuidle: fix wrong driver initialization)
Quoted 131 lines · Daniel Lezcano
Quoted 57 lines · Santosh Shilimkar
Quoted 50 lines · Amit Kucheria
Quoted 34 lines · Santosh Shilimkar
Quoted 25 lines · Amit Kucheria
Quoted 23 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Quoted 8 lines
Quoted 1 line
Any idea to simplify the cpuidle consolidation and maintenance ?
Adding Arnd and Olof to this discussion since atleast the ARM drivers go through their arm-soc tree.
Given the work you're putting in to consolidate the drivers, perhaps they can insist that idle drivers get acked by you?
Quoted 8 lines
Not to create controversy but as a general rule there is nothing like *insisting* ack on patches for merge apart from the official maintainers(gate keepers).
Having said that, its always good to get more reviews and acks so that better code gets merged.
This just my personal opinion.
I'm not asking for special treatment here. :) I'm requesting one set of maintainers (arm-soc maintainers) to push back on changes that don't get platform idle drivers in sync with the consolidation work that is currently ongoing.
Quoted 6 lines
This will speed up the process since it is hard to track every SoC-specific list for these changes. Some platform maintainers might not even be aware of it (those that Daniel hasn't modified yet). A similar approach seems to have worked for common clock, DT, pinmux, etc.
Quoted 4 lines
Every patch gets pulled into arm-soc/arm-core has to be posted on LAKML. So as long as everybody follows that rule, there is no need to track every SoC lists. And what I have seen so far every this rule has been followed well.
(Added Benjamin, Deepthi and Paul)
I don't think everybody is following this rule, patches go to the SoC maintainer's tree without sometimes going through lakml.
Furthermore, there is not only ARM, there is also
acpi_idle,intel_idle,pseries_idleandsh_idle, respectively located in:
drivers/acpi/processor_idle.cdrivers/acpi/processor_driver.cdrivers/idle/intel_idle.cThese ones above are under linux-pm, that is Rafael, like cpuidle, even if it is not marked in the
MAINTAINERSfile, so that should be ok.And there is also:
arch/sh/kernel/cpu/shmobile/cpuidle.carch/powerpc/platforms/pseries/processor_idle.cAnd hopefully, some others in the right place,
calxeda_idleandkirwood_idlelocated indrivers/cpuidle.In the maintainer file, there is no information about cpuidle at all.
For example, if someone modify the cpuidle framework allowing to consolidate the code across the different drivers, we have to wait for the merge before using the new api into the different drivers. If we follow strictly the path of the merge tree we fall into a scenario where consolidating the drivers takes a loooooong time.
From my POV, *all* the cpuidle drivers must go under
drivers/cpuidle, like cpufreq and pass through a single entry point to apply the patches, so the cpuidle framework and the drivers are always synced.If everyone agree and we reach this consensus, then we can work to move these drivers to a single place.
I think Amit was suggesting to Cc me in the meantime, so while we are moving these drivers to this place, I can help to ensure we go to the same direction.
For example, Arnd Cc'ed me about the zynq cpuidle driver when it has been posted and, after review, it appeared it was totally obsolete wrt the modifications we did this year.
I propose first to add an entry in
MAINTAINERS:MAINTAINERS +8
-0@@ -2206,6 +2206,15 @@ S: Maintained F: drivers/cpufreq/ F: include/linux/cpufreq.h +CPU IDLE DRIVERS +M: Rafael J. Wysocki <[email protected]> +L: [email protected] +L: [email protected] +S: Maintained +F: drivers/cpuidle/ +F: include/linux/cpuidle.h + CPUID/MSR DRIVER M: "H. Peter Anvin" <[email protected]> S: Maintained
Quoted 1 line
Does it make sense ?
Yes, it does to me. :-)
That said, I'm not sure if moving the existing cpuidle drivers to that directory solves any problems. If somebody wants to keep their cpudile driver in his/her arch or platform, and there may be reasons for that, it's basically fine by me.
Thanks,
Rafael
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
How to facilitate the cpuidle drivers to go to the same direction (Was: Re: [PATCH 4/9] ARM: OMAP4: cpuidle: fix wrong driver initialization)
In reply to Daniel LezcanoQuoted 94 lines · Daniel Lezcano
Quoted 57 lines · Santosh Shilimkar
Quoted 50 lines · Amit Kucheria
Quoted 34 lines · Santosh Shilimkar
Quoted 25 lines · Amit Kucheria
Quoted 23 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Quoted 8 lines
Quoted 1 line
Any idea to simplify the cpuidle consolidation and maintenance ?
Adding Arnd and Olof to this discussion since atleast the ARM drivers go through their arm-soc tree.
Given the work you're putting in to consolidate the drivers, perhaps they can insist that idle drivers get acked by you?
Quoted 8 lines
Not to create controversy but as a general rule there is nothing like *insisting* ack on patches for merge apart from the official maintainers(gate keepers).
Having said that, its always good to get more reviews and acks so that better code gets merged.
This just my personal opinion.
I'm not asking for special treatment here. :) I'm requesting one set of maintainers (arm-soc maintainers) to push back on changes that don't get platform idle drivers in sync with the consolidation work that is currently ongoing.
Quoted 6 lines
This will speed up the process since it is hard to track every SoC-specific list for these changes. Some platform maintainers might not even be aware of it (those that Daniel hasn't modified yet). A similar approach seems to have worked for common clock, DT, pinmux, etc.
Quoted 4 lines
Every patch gets pulled into arm-soc/arm-core has to be posted on LAKML. So as long as everybody follows that rule, there is no need to track every SoC lists. And what I have seen so far every this rule has been followed well.
(Added Benjamin, Deepthi and Paul)
I don't think everybody is following this rule, patches go to the SoC maintainer's tree without sometimes going through lakml.
Furthermore, there is not only ARM, there is also
acpi_idle,intel_idle,pseries_idleandsh_idle, respectively located in:
drivers/acpi/processor_idle.cdrivers/acpi/processor_driver.cdrivers/idle/intel_idle.cThese ones above are under linux-pm, that is Rafael, like cpuidle, even if it is not marked in the
MAINTAINERSfile, so that should be ok.And there is also:
arch/sh/kernel/cpu/shmobile/cpuidle.carch/powerpc/platforms/pseries/processor_idle.cAnd hopefully, some others in the right place,
calxeda_idleandkirwood_idlelocated indrivers/cpuidle.In the maintainer file, there is no information about cpuidle at all.
For example, if someone modify the cpuidle framework allowing to consolidate the code across the different drivers, we have to wait for the merge before using the new api into the different drivers. If we follow strictly the path of the merge tree we fall into a scenario where consolidating the drivers takes a loooooong time.
Quoted 3 lines
From my POV, *all* the cpuidle drivers must go under
drivers/cpuidle, like cpufreq and pass through a single entry point to apply the patches, so the cpuidle framework and the drivers are always synced.
I can very much relate to the above mentioned problem, where code modifications done as a part of cpuidle framework needs to be reflected in every arch back-end cpuidle driver.
We do have added advantages in moving
all the back-end drivers into drivers/cpuidle.
This would help us achieve better reviews, easier consolidations and more importantly maintaining sync btw drivers and framework and the up-streaming process.
But then, this means we get all the
arch specific code out under drivers/cpuidle
which can be very messy. Also instances where the changes
are specifically tied only to the architecture of the back-end driver (SoC specific), it is absolutely necessary to get SoC maintainer's review.
Cheers,
Deepthi
Quoted 39 lines
If everyone agree and we reach this consensus, then we can work to move these drivers to a single place.
I think Amit was suggesting to Cc me in the meantime, so while we are moving these drivers to this place, I can help to ensure we go to the same direction.
For example, Arnd Cc'ed me about the zynq cpuidle driver when it has been posted and, after review, it appeared it was totally obsolete wrt the modifications we did this year.
I propose first to add an entry in
MAINTAINERS:MAINTAINERS +8
-0@@ -2206,6 +2206,15 @@ S: Maintained F: drivers/cpufreq/ F: include/linux/cpufreq.h +CPU IDLE DRIVERS +M: Rafael J. Wysocki <[email protected]> +L: cpuidle at vger.kernel.org +L: linux-pm at vger.kernel.org +S: Maintained +F: drivers/cpuidle/ +F: include/linux/cpuidle.h + CPUID/MSR DRIVER M: "H. Peter Anvin" <[email protected]> S: MaintainedDoes it make sense ?
Thanks
-- Daniel
How to facilitate the cpuidle drivers to go to the same direction (Was: Re: [PATCH 4/9] ARM: OMAP4: cpuidle: fix wrong driver initialization)
Quoted 108 lines · Deepthi Dharwar
Quoted 94 lines · Daniel Lezcano
Quoted 57 lines · Santosh Shilimkar
Quoted 50 lines · Amit Kucheria
Quoted 34 lines · Santosh Shilimkar
Quoted 25 lines · Amit Kucheria
Quoted 23 lines · Daniel Lezcano
Quoted 9 lines · Santosh Shilimkar
Quoted 7 lines · Daniel Lezcano
The driver is initialized several times. This is wrong and if the return code of the function was checked, it will return
-EINVAL.Move this initialization out of the loop.
Signed-off-by Daniel Lezcano <[email protected]>---
Fix for this is already and v2 of the patch is here [1]
Ah, ok. Thanks for reviewing the patch.
Can we find a solution to have a single entry point to sumbit patches for all the cpuidle drivers ?
Otherwise, consolidating them is a pain: a patch for the samsung tree, another one for the at91 tree, etc ... and wait for all the trees to sync before continuing to consolidate the code.
Wouldn't be worth to move these drivers under the PM umbrella instead of the SoC specific code ?
Quoted 8 lines
Quoted 1 line
Any idea to simplify the cpuidle consolidation and maintenance ?
Adding Arnd and Olof to this discussion since atleast the ARM drivers go through their arm-soc tree.
Given the work you're putting in to consolidate the drivers, perhaps they can insist that idle drivers get acked by you?
Quoted 8 lines
Not to create controversy but as a general rule there is nothing like *insisting* ack on patches for merge apart from the official maintainers(gate keepers).
Having said that, its always good to get more reviews and acks so that better code gets merged.
This just my personal opinion.
I'm not asking for special treatment here. :) I'm requesting one set of maintainers (arm-soc maintainers) to push back on changes that don't get platform idle drivers in sync with the consolidation work that is currently ongoing.
Quoted 6 lines
This will speed up the process since it is hard to track every SoC-specific list for these changes. Some platform maintainers might not even be aware of it (those that Daniel hasn't modified yet). A similar approach seems to have worked for common clock, DT, pinmux, etc.
Quoted 4 lines
Every patch gets pulled into arm-soc/arm-core has to be posted on LAKML. So as long as everybody follows that rule, there is no need to track every SoC lists. And what I have seen so far every this rule has been followed well.
(Added Benjamin, Deepthi and Paul)
I don't think everybody is following this rule, patches go to the SoC maintainer's tree without sometimes going through lakml.
Furthermore, there is not only ARM, there is also
acpi_idle,intel_idle,pseries_idleandsh_idle, respectively located in:
drivers/acpi/processor_idle.cdrivers/acpi/processor_driver.cdrivers/idle/intel_idle.cThese ones above are under linux-pm, that is Rafael, like cpuidle, even if it is not marked in the
MAINTAINERSfile, so that should be ok.And there is also:
arch/sh/kernel/cpu/shmobile/cpuidle.carch/powerpc/platforms/pseries/processor_idle.cAnd hopefully, some others in the right place,
calxeda_idleandkirwood_idlelocated indrivers/cpuidle.In the maintainer file, there is no information about cpuidle at all.
For example, if someone modify the cpuidle framework allowing to consolidate the code across the different drivers, we have to wait for the merge before using the new api into the different drivers. If we follow strictly the path of the merge tree we fall into a scenario where consolidating the drivers takes a loooooong time.
Quoted 3 lines
From my POV, *all* the cpuidle drivers must go under
drivers/cpuidle, like cpufreq and pass through a single entry point to apply the patches, so the cpuidle framework and the drivers are always synced.I can very much relate to the above mentioned problem, where code modifications done as a part of cpuidle framework needs to be reflected in every arch back-end cpuidle driver.
We do have added advantages in moving
all the back-end drivers intodrivers/cpuidle.
This would help us achieve better reviews, easier consolidations and more importantly maintaining sync btw drivers and framework and the up-streaming process.
Quoted 5 lines
But then, this means we get all the
arch specific code out underdrivers/cpuidle
which can be very messy. Also instances where the changes
are specifically tied only to the architecture of the back-end driver (SoC specific), it is absolutely necessary to get SoC maintainer's review.
Yes, I agree.
This is why an important work of separating the PM code from the cpuidle driver must be done in order to achieve this migration.
Some of this has been done for the at91 and u8500 driver.
Thanks
-- Daniel
Quoted 44 lines
Cheers,
DeepthiQuoted 39 lines
If everyone agree and we reach this consensus, then we can work to move these drivers to a single place.
I think Amit was suggesting to Cc me in the meantime, so while we are moving these drivers to this place, I can help to ensure we go to the same direction.
For example, Arnd Cc'ed me about the zynq cpuidle driver when it has been posted and, after review, it appeared it was totally obsolete wrt the modifications we did this year.
I propose first to add an entry in
MAINTAINERS:MAINTAINERS +8
-0@@ -2206,6 +2206,15 @@ S: Maintained F: drivers/cpufreq/ F: include/linux/cpufreq.h +CPU IDLE DRIVERS +M: Rafael J. Wysocki <[email protected]> +L: cpuidle at vger.kernel.org +L: linux-pm at vger.kernel.org +S: Maintained +F: drivers/cpuidle/ +F: include/linux/cpuidle.h + CPUID/MSR DRIVER M: "H. Peter Anvin" <[email protected]> S: MaintainedDoes it make sense ?
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
How to facilitate the cpuidle drivers to go to the same direction (Was: Re: [PATCH 4/9] ARM: OMAP4: cpuidle: fix wrong driver initialization)
In reply to Deepthi DharwarQuoted 3 lines · Deepthi Dharwar
But then, this means we get all the
arch specific code out underdrivers/cpuidle
which can be very messy.
Not really no. We already have that here or there in other drivers, it's not necessarily messy and the stuff like that can generally be made reasonably self contained.
The main issue is that if I (powerpc) wants a fix in my some_ppc_box_idle.c driver, especially if it needs to sync with other arch changes, having to sync/ack with Rafael might complicate things a bit (though not necessarily a lot).
I would probably keep the liberty of sending to Linus directly urgent bug/regression fixes to individual cpuidle drivers relating to our archs without waiting every now and then if for example Rafael is on vacation :-)
Quoted 4 lines
Also instances where the changes
are specifically tied only to the architecture of the back-end driver (SoC specific), it is absolutely necessary to get SoC maintainer's review.
Ben.
How to facilitate the cpuidle drivers to go to the same direction (Was: Re: [PATCH 4/9] ARM: OMAP4: cpuidle: fix wrong driver initialization)
Quoted 14 lines · Benjamin Herrenschmidt
Quoted 3 lines · Deepthi Dharwar
But then, this means we get all the
arch specific code out underdrivers/cpuidle
which can be very messy.Not really no. We already have that here or there in other drivers, it's not necessarily messy and the stuff like that can generally be made reasonably self contained.
The main issue is that if I (powerpc) wants a fix in my
some_ppc_box_idle.cdriver, especially if it needs to sync with other arch changes, having to sync/ack with Rafael might complicate things a bit (though not necessarily a lot).
Quoted 4 lines
I would probably keep the liberty of sending to Linus directly urgent bug/regression fixes to individual cpuidle drivers relating to our archs without waiting every now and then if for example Rafael is on vacation :-)
Merging them all over sounds like a good idea to me as well.
This isn't too different from how we handle other subsystems; as architecutre maintainer you just use your judgement on what needs an ack vs cc. Some smaller details about how the backend of the driver works on a platform is quite different from refactoring portions of the framework.
-Olof
PATCH 5/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: tegra2: cpuidle: change driver initialization
Quoted 3 lines · Daniel Lezcano
Initialize the idle states directly in the driver structure.
That prevents extra structure declaration and memcpy at init time.
Joseph, can you please review/ack patch 5/9 and patch 6/9. Thanks.
PATCH 5/9 ARM: tegra2: cpuidle: change driver initialization
Quoted 6 lines · Stephen Warren
Quoted 3 lines · Daniel Lezcano
Initialize the idle states directly in the driver structure.
That prevents extra structure declaration and memcpy at init time.
Joseph, can you please review/ack patch 5/9 and patch 6/9. Thanks.
Thanks Joseph to review the patches.
Rafael is expecting an Acked-by.
If you are ok, with these patches, is it possible to ack them please ?
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 5/9 ARM: tegra2: cpuidle: change driver initialization
Quoted 6 lines · Daniel Lezcano
Quoted 5 lines · Stephen Warren
Quoted 3 lines · Daniel Lezcano
Initialize the idle states directly in the driver structure.
That prevents extra structure declaration and memcpy at init time.
Quoted 8 lines
Quoted 1 line
Joseph, can you please review/ack patch 5/9 and patch 6/9. Thanks.
Thanks Joseph to review the patches.
Rafael is expecting an Acked-by.
If you are ok, with these patches, is it possible to ack them please ?
OK.
The 5/9 and 6/9 of this series.
Thanks,
Joseph
Quoted 2 lines
PATCH 5/9 ARM: tegra2: cpuidle: change driver initialization
Quoted 11 lines · Joseph Lo
Quoted 10 lines · Daniel Lezcano
Quoted 6 lines · Stephen Warren
Quoted 3 lines · Daniel Lezcano
Initialize the idle states directly in the driver structure.
That prevents extra structure declaration and memcpy at init time.
Joseph, can you please review/ack patch 5/9 and patch 6/9. Thanks.
Thanks Joseph to review the patches.
Quoted 8 lines
Quoted 4 lines
Rafael is expecting an Acked-by.
If you are ok, with these patches, is it possible to ack them please ?
OK.
The 5/9 and 6/9 of this series.
Acked-by Joseph Lo <[email protected]>
Thanks Joseph.
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 5/9 ARM: tegra2: cpuidle: change driver initialization
In reply to Daniel LezcanoQuoted 5 lines · Daniel Lezcano
Initialize the idle states directly in the driver structure.
That prevents extra structure declaration and memcpy at init time.
Signed-off-by Daniel Lezcano <[email protected]>
Hi Daniel,
Thank you.
Both the 5th and 6th patch,
PATCH 5/9 ARM: tegra2: cpuidle: change driver initialization
Quoted 7 lines · Joseph Lo
Quoted 5 lines · Daniel Lezcano
Initialize the idle states directly in the driver structure.
That prevents extra structure declaration and memcpy at init time.
Signed-off-by Daniel Lezcano <[email protected]>
Quoted 7 lines
Hi Daniel,
Thank you.
Both the 5th and 6th patch,
Reviewed-by Joseph Lo <[email protected]>
Thanks. Those same two patches therefore,
PATCH 6/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 7/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 7/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]>---
Looks right to me.
PATCH 8/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 9/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 9/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]>---
PATCH 1/9 ARM: cpuidle: remove useless declaration
In reply to Daniel LezcanoQuoted 3 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.
Well the inline function was to avoid buid breaks when !CONFIG_CPU_IDLE.
Quoted 2 lines
Signed-off-by Daniel Lezcano <[email protected]>---
Function without definition will break the build, No? Just declaration isn't won't help to get the build through.
Ofcourse if all idle drivers are build *only when* CONFIG_CPU_IDLE=y, then the patch is should be fine.
Regards,
Santosh
PATCH 1/9 ARM: cpuidle: remove useless declaration
Quoted 6 lines · Santosh Shilimkar
Quoted 3 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.Well the inline function was to avoid buid breaks when !CONFIG_CPU_IDLE.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Daniel Lezcano <[email protected]>---
Function without definition will break the build, No? Just declaration isn't won't help to get the build through.
Ofcourse if all idle drivers are build *only when*
CONFIG_CPU_IDLE=y, then the patch is should be fine.
Yes, it is case AFAICT.
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