Patchwork [05/15] cpuidle: imx6: remove timer broadcast initialization

login
register
mail settings
Submitter Daniel Lezcano
Date March 25, 2013, 5:55 p.m.
Message ID <1364234140-514-6-git-send-email-daniel.lezcano@linaro.org>
Download mbox | patch
Permalink /patch/230866/
State New
Headers show

Comments

Daniel Lezcano - March 25, 2013, 5:55 p.m.
The initialization is done from the cpuidle framework.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/mach-imx/cpuidle-imx6q.c |   15 ---------------
 1 file changed, 15 deletions(-)
Shawn Guo - March 26, 2013, 7:25 a.m.
On Mon, Mar 25, 2013 at 06:55:30PM +0100, Daniel Lezcano wrote:
> The initialization is done from the cpuidle framework.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  arch/arm/mach-imx/cpuidle-imx6q.c |   15 ---------------
>  1 file changed, 15 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c
> index 5ae22f7..a783a63 100644
> --- a/arch/arm/mach-imx/cpuidle-imx6q.c
> +++ b/arch/arm/mach-imx/cpuidle-imx6q.c
> @@ -6,7 +6,6 @@
>   * published by the Free Software Foundation.
>   */
>  
> -#include <linux/clockchips.h>

Removing this causes the compile error below.

  CC      arch/arm/mach-imx/cpuidle-imx6q.o
arch/arm/mach-imx/cpuidle-imx6q.c: In function ‘imx6q_enter_wait’:
arch/arm/mach-imx/cpuidle-imx6q.c:25:2: error: implicit declaration of function ‘clockevents_notify’ [-Werror=implicit-function-declaration]
arch/arm/mach-imx/cpuidle-imx6q.c:25:21: error: ‘CLOCK_EVT_NOTIFY_BROADCAST_ENTER’ undeclared (first use in this function)
arch/arm/mach-imx/cpuidle-imx6q.c:25:21: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/mach-imx/cpuidle-imx6q.c:45:21: error: ‘CLOCK_EVT_NOTIFY_BROADCAST_EXIT’ undeclared (first use in this function)
cc1: some warnings being treated as errors
make[2]: *** [arch/arm/mach-imx/cpuidle-imx6q.o] Error 1

Shawn

>  #include <linux/cpuidle.h>
>  #include <linux/module.h>
>  #include <asm/cpuidle.h>
> @@ -43,17 +42,6 @@ done:
>  	return index;
>  }
>  
> -/*
> - * For each cpu, setup the broadcast timer because local timer
> - * stops for the states other than WFI.
> - */
> -static void imx6q_setup_broadcast_timer(void *arg)
> -{
> -	int cpu = smp_processor_id();
> -
> -	clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
> -}
> -
>  static struct cpuidle_driver imx6q_cpuidle_driver = {
>  	.name = "imx6q_cpuidle",
>  	.owner = THIS_MODULE,
> @@ -84,8 +72,5 @@ int __init imx6q_cpuidle_init(void)
>  	/* Set chicken bit to get a reliable WAIT mode support */
>  	imx6q_set_chicken_bit();
>  
> -	/* Configure the broadcast timer on each cpu */
> -	on_each_cpu(imx6q_setup_broadcast_timer, NULL, 1);
> -
>  	return imx_cpuidle_init(&imx6q_cpuidle_driver);
>  }
> -- 
> 1.7.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Daniel Lezcano - March 26, 2013, 9:43 a.m.
On 03/26/2013 08:25 AM, Shawn Guo wrote:
> On Mon, Mar 25, 2013 at 06:55:30PM +0100, Daniel Lezcano wrote:
>> The initialization is done from the cpuidle framework.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>>  arch/arm/mach-imx/cpuidle-imx6q.c |   15 ---------------
>>  1 file changed, 15 deletions(-)
>>
>> diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c
>> index 5ae22f7..a783a63 100644
>> --- a/arch/arm/mach-imx/cpuidle-imx6q.c
>> +++ b/arch/arm/mach-imx/cpuidle-imx6q.c
>> @@ -6,7 +6,6 @@
>>   * published by the Free Software Foundation.
>>   */
>>  
>> -#include <linux/clockchips.h>
> 
> Removing this causes the compile error below.
> 
>   CC      arch/arm/mach-imx/cpuidle-imx6q.o
> arch/arm/mach-imx/cpuidle-imx6q.c: In function ‘imx6q_enter_wait’:
> arch/arm/mach-imx/cpuidle-imx6q.c:25:2: error: implicit declaration of function ‘clockevents_notify’ [-Werror=implicit-function-declaration]
> arch/arm/mach-imx/cpuidle-imx6q.c:25:21: error: ‘CLOCK_EVT_NOTIFY_BROADCAST_ENTER’ undeclared (first use in this function)
> arch/arm/mach-imx/cpuidle-imx6q.c:25:21: note: each undeclared identifier is reported only once for each function it appears in
> arch/arm/mach-imx/cpuidle-imx6q.c:45:21: error: ‘CLOCK_EVT_NOTIFY_BROADCAST_EXIT’ undeclared (first use in this function)
> cc1: some warnings being treated as errors
> make[2]: *** [arch/arm/mach-imx/cpuidle-imx6q.o] Error 1


Hi Shawn,

actually this is because the patch applies on top of:

commit 12e849504b861470e5bf991f79c0be71b97c8dac
Author: Daniel Lezcano <daniel.lezcano@linaro.org>
Date:   Thu Mar 21 12:21:33 2013 +0000

    cpuidle / imx6 : use CPUIDLE_FLAG_TIMER_STOP flag

    Use the CPUIDLE_FLAG_TIMER_STOP and let the cpuidle framework
    to handle the CLOCK_EVT_NOTIFY_BROADCAST_ENTER/EXIT when entering
    this state.

    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Shawn Guo - March 26, 2013, 12:40 p.m.
On Tue, Mar 26, 2013 at 10:43:29AM +0100, Daniel Lezcano wrote:
> Hi Shawn,
>
> actually this is because the patch applies on top of:
>
Ah, ok. It will be helpful for people who want to test the series on
their platform, if you can publish a branch for that.

Shawn

> commit 12e849504b861470e5bf991f79c0be71b97c8dac
> Author: Daniel Lezcano <daniel.lezcano@linaro.org>
> Date:   Thu Mar 21 12:21:33 2013 +0000
>
>     cpuidle / imx6 : use CPUIDLE_FLAG_TIMER_STOP flag
>
>     Use the CPUIDLE_FLAG_TIMER_STOP and let the cpuidle framework
>     to handle the CLOCK_EVT_NOTIFY_BROADCAST_ENTER/EXIT when entering
>     this state.
>
>     Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>     Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Daniel Lezcano - March 26, 2013, 12:53 p.m.
On 03/26/2013 01:40 PM, Shawn Guo wrote:
> On Tue, Mar 26, 2013 at 10:43:29AM +0100, Daniel Lezcano wrote:
>> Hi Shawn,
>>
>> actually this is because the patch applies on top of:
>>
> Ah, ok. It will be helpful for people who want to test the series on
> their platform, if you can publish a branch for that.

Yes, sure.

It is in Rafael's tree.

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git

in linux-next branch.

Thanks for the review

  -- Daniel

>> commit 12e849504b861470e5bf991f79c0be71b97c8dac
>> Author: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Date:   Thu Mar 21 12:21:33 2013 +0000
>>
>>     cpuidle / imx6 : use CPUIDLE_FLAG_TIMER_STOP flag
>>
>>     Use the CPUIDLE_FLAG_TIMER_STOP and let the cpuidle framework
>>     to handle the CLOCK_EVT_NOTIFY_BROADCAST_ENTER/EXIT when entering
>>     this state.
>>
>>     Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>     Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Rafael J. Wysocki - March 26, 2013, 1:06 p.m.
On Tuesday, March 26, 2013 01:53:34 PM Daniel Lezcano wrote:
> On 03/26/2013 01:40 PM, Shawn Guo wrote:
> > On Tue, Mar 26, 2013 at 10:43:29AM +0100, Daniel Lezcano wrote:
> >> Hi Shawn,
> >>
> >> actually this is because the patch applies on top of:
> >>
> > Ah, ok. It will be helpful for people who want to test the series on
> > their platform, if you can publish a branch for that.
> 
> Yes, sure.
> 
> It is in Rafael's tree.
> 
> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git
> 
> in linux-next branch.

IOW, the patchset is based on the current linux-next. :-)

Thanks,
Rafael


> >> commit 12e849504b861470e5bf991f79c0be71b97c8dac
> >> Author: Daniel Lezcano <daniel.lezcano@linaro.org>
> >> Date:   Thu Mar 21 12:21:33 2013 +0000
> >>
> >>     cpuidle / imx6 : use CPUIDLE_FLAG_TIMER_STOP flag
> >>
> >>     Use the CPUIDLE_FLAG_TIMER_STOP and let the cpuidle framework
> >>     to handle the CLOCK_EVT_NOTIFY_BROADCAST_ENTER/EXIT when entering
> >>     this state.
> >>
> >>     Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> >>     Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> >>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> 
>
Shawn Guo - March 26, 2013, 2:28 p.m.
On Mon, Mar 25, 2013 at 06:55:30PM +0100, Daniel Lezcano wrote:
> The initialization is done from the cpuidle framework.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Acked-by: Shawn Guo <shawn.guo@linaro.org>

> ---
>  arch/arm/mach-imx/cpuidle-imx6q.c |   15 ---------------
>  1 file changed, 15 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c
> index 5ae22f7..a783a63 100644
> --- a/arch/arm/mach-imx/cpuidle-imx6q.c
> +++ b/arch/arm/mach-imx/cpuidle-imx6q.c
> @@ -6,7 +6,6 @@
>   * published by the Free Software Foundation.
>   */
>  
> -#include <linux/clockchips.h>
>  #include <linux/cpuidle.h>
>  #include <linux/module.h>
>  #include <asm/cpuidle.h>
> @@ -43,17 +42,6 @@ done:
>  	return index;
>  }
>  
> -/*
> - * For each cpu, setup the broadcast timer because local timer
> - * stops for the states other than WFI.
> - */
> -static void imx6q_setup_broadcast_timer(void *arg)
> -{
> -	int cpu = smp_processor_id();
> -
> -	clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
> -}
> -
>  static struct cpuidle_driver imx6q_cpuidle_driver = {
>  	.name = "imx6q_cpuidle",
>  	.owner = THIS_MODULE,
> @@ -84,8 +72,5 @@ int __init imx6q_cpuidle_init(void)
>  	/* Set chicken bit to get a reliable WAIT mode support */
>  	imx6q_set_chicken_bit();
>  
> -	/* Configure the broadcast timer on each cpu */
> -	on_each_cpu(imx6q_setup_broadcast_timer, NULL, 1);
> -
>  	return imx_cpuidle_init(&imx6q_cpuidle_driver);
>  }
> -- 
> 1.7.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c
index 5ae22f7..a783a63 100644
--- a/arch/arm/mach-imx/cpuidle-imx6q.c
+++ b/arch/arm/mach-imx/cpuidle-imx6q.c
@@ -6,7 +6,6 @@ 
  * published by the Free Software Foundation.
  */
 
-#include <linux/clockchips.h>
 #include <linux/cpuidle.h>
 #include <linux/module.h>
 #include <asm/cpuidle.h>
@@ -43,17 +42,6 @@  done:
 	return index;
 }
 
-/*
- * For each cpu, setup the broadcast timer because local timer
- * stops for the states other than WFI.
- */
-static void imx6q_setup_broadcast_timer(void *arg)
-{
-	int cpu = smp_processor_id();
-
-	clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
-}
-
 static struct cpuidle_driver imx6q_cpuidle_driver = {
 	.name = "imx6q_cpuidle",
 	.owner = THIS_MODULE,
@@ -84,8 +72,5 @@  int __init imx6q_cpuidle_init(void)
 	/* Set chicken bit to get a reliable WAIT mode support */
 	imx6q_set_chicken_bit();
 
-	/* Configure the broadcast timer on each cpu */
-	on_each_cpu(imx6q_setup_broadcast_timer, NULL, 1);
-
 	return imx_cpuidle_init(&imx6q_cpuidle_driver);
 }