All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP2+: PM: Warn users of sleep_while_idle if !CONFIG_CPU_IDLE
@ 2011-02-16 12:04 ` Rajendra Nayak
  0 siblings, 0 replies; 6+ messages in thread
From: Rajendra Nayak @ 2011-02-16 12:04 UTC (permalink / raw)
  To: linux-omap; +Cc: khilman, linux-arm-kernel, Rajendra Nayak

This should help users who do a
'echo 1 > /debug/pm_debug/sleep_while_idle' with a
config which has !CONFIG_CPU_IDLE and wonder
why OMAP is'nt sleeping in idle.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/mach-omap2/pm-debug.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 125f565..1e722a0 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -569,6 +569,10 @@ static int option_get(void *data, u64 *val)
 
 	*val = *option;
 
+#ifndef CONFIG_CPU_IDLE
+	if (option == &sleep_while_idle)
+		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
+#endif
 	return 0;
 }
 
@@ -581,6 +585,11 @@ static int option_set(void *data, u64 val)
 
 	*option = val;
 
+#ifndef CONFIG_CPU_IDLE
+	if (option == &sleep_while_idle)
+		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
+#endif
+
 	if (option == &enable_off_mode) {
 		if (val)
 			omap_pm_enable_off_mode();
-- 
1.7.0.4


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

* [PATCH] OMAP2+: PM: Warn users of sleep_while_idle if !CONFIG_CPU_IDLE
@ 2011-02-16 12:04 ` Rajendra Nayak
  0 siblings, 0 replies; 6+ messages in thread
From: Rajendra Nayak @ 2011-02-16 12:04 UTC (permalink / raw)
  To: linux-arm-kernel

This should help users who do a
'echo 1 > /debug/pm_debug/sleep_while_idle' with a
config which has !CONFIG_CPU_IDLE and wonder
why OMAP is'nt sleeping in idle.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/mach-omap2/pm-debug.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 125f565..1e722a0 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -569,6 +569,10 @@ static int option_get(void *data, u64 *val)
 
 	*val = *option;
 
+#ifndef CONFIG_CPU_IDLE
+	if (option == &sleep_while_idle)
+		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
+#endif
 	return 0;
 }
 
@@ -581,6 +585,11 @@ static int option_set(void *data, u64 val)
 
 	*option = val;
 
+#ifndef CONFIG_CPU_IDLE
+	if (option == &sleep_while_idle)
+		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
+#endif
+
 	if (option == &enable_off_mode) {
 		if (val)
 			omap_pm_enable_off_mode();
-- 
1.7.0.4

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

* Re: [PATCH] OMAP2+: PM: Warn users of sleep_while_idle if !CONFIG_CPU_IDLE
  2011-02-16 12:04 ` Rajendra Nayak
@ 2011-03-01 21:54   ` Kevin Hilman
  -1 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-03-01 21:54 UTC (permalink / raw)
  To: Rajendra Nayak; +Cc: linux-omap, linux-arm-kernel

Rajendra Nayak <rnayak@ti.com> writes:

> This should help users who do a
> 'echo 1 > /debug/pm_debug/sleep_while_idle' with a
> config which has !CONFIG_CPU_IDLE and wonder
> why OMAP is'nt sleeping in idle.

This isn't quite right, as 'sleep_while_idle' is actually a flag for
whether or not to call omap_sram_idle() at all.

Even without CPUidle, WFI will still be attempted.

Kevin

> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> ---
>  arch/arm/mach-omap2/pm-debug.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
> index 125f565..1e722a0 100644
> --- a/arch/arm/mach-omap2/pm-debug.c
> +++ b/arch/arm/mach-omap2/pm-debug.c
> @@ -569,6 +569,10 @@ static int option_get(void *data, u64 *val)
>  
>  	*val = *option;
>  
> +#ifndef CONFIG_CPU_IDLE
> +	if (option == &sleep_while_idle)
> +		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
> +#endif
>  	return 0;
>  }
>  
> @@ -581,6 +585,11 @@ static int option_set(void *data, u64 val)
>  
>  	*option = val;
>  
> +#ifndef CONFIG_CPU_IDLE
> +	if (option == &sleep_while_idle)
> +		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
> +#endif
> +
>  	if (option == &enable_off_mode) {
>  		if (val)
>  			omap_pm_enable_off_mode();

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

* [PATCH] OMAP2+: PM: Warn users of sleep_while_idle if !CONFIG_CPU_IDLE
@ 2011-03-01 21:54   ` Kevin Hilman
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-03-01 21:54 UTC (permalink / raw)
  To: linux-arm-kernel

Rajendra Nayak <rnayak@ti.com> writes:

> This should help users who do a
> 'echo 1 > /debug/pm_debug/sleep_while_idle' with a
> config which has !CONFIG_CPU_IDLE and wonder
> why OMAP is'nt sleeping in idle.

This isn't quite right, as 'sleep_while_idle' is actually a flag for
whether or not to call omap_sram_idle() at all.

Even without CPUidle, WFI will still be attempted.

Kevin

> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> ---
>  arch/arm/mach-omap2/pm-debug.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
> index 125f565..1e722a0 100644
> --- a/arch/arm/mach-omap2/pm-debug.c
> +++ b/arch/arm/mach-omap2/pm-debug.c
> @@ -569,6 +569,10 @@ static int option_get(void *data, u64 *val)
>  
>  	*val = *option;
>  
> +#ifndef CONFIG_CPU_IDLE
> +	if (option == &sleep_while_idle)
> +		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
> +#endif
>  	return 0;
>  }
>  
> @@ -581,6 +585,11 @@ static int option_set(void *data, u64 val)
>  
>  	*option = val;
>  
> +#ifndef CONFIG_CPU_IDLE
> +	if (option == &sleep_while_idle)
> +		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
> +#endif
> +
>  	if (option == &enable_off_mode) {
>  		if (val)
>  			omap_pm_enable_off_mode();

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

* Re: [PATCH] OMAP2+: PM: Warn users of sleep_while_idle if !CONFIG_CPU_IDLE
  2011-03-01 21:54   ` Kevin Hilman
@ 2011-03-03  9:32     ` Rajendra Nayak
  -1 siblings, 0 replies; 6+ messages in thread
From: Rajendra Nayak @ 2011-03-03  9:32 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap, linux-arm-kernel

On Wednesday 02 March 2011 03:24 AM, Kevin Hilman wrote:
> Rajendra Nayak<rnayak@ti.com>  writes:
>
>> This should help users who do a
>> 'echo 1>  /debug/pm_debug/sleep_while_idle' with a
>> config which has !CONFIG_CPU_IDLE and wonder
>> why OMAP is'nt sleeping in idle.
>
> This isn't quite right, as 'sleep_while_idle' is actually a flag for
> whether or not to call omap_sram_idle() at all.

Hi Kevin,

I know this is used in 'omap3_pm_idle' as well
to decide whether or not to call omap_sram_idle() but
I was'nt quite sure what omap3_pm_idle is expected to do
in the first place.
We end up calling omap_sram_idle here without really
programming any target state. Do we really need this to
happen, instead can't we just rely on ARM generic code
to do a WFI in case we don't have cpuidle support enabled?

regards,
Rajendra

>
> Even without CPUidle, WFI will still be attempted.
>
> Kevin
>
>> Signed-off-by: Rajendra Nayak<rnayak@ti.com>
>> ---
>>   arch/arm/mach-omap2/pm-debug.c |    9 +++++++++
>>   1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
>> index 125f565..1e722a0 100644
>> --- a/arch/arm/mach-omap2/pm-debug.c
>> +++ b/arch/arm/mach-omap2/pm-debug.c
>> @@ -569,6 +569,10 @@ static int option_get(void *data, u64 *val)
>>
>>   	*val = *option;
>>
>> +#ifndef CONFIG_CPU_IDLE
>> +	if (option ==&sleep_while_idle)
>> +		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
>> +#endif
>>   	return 0;
>>   }
>>
>> @@ -581,6 +585,11 @@ static int option_set(void *data, u64 val)
>>
>>   	*option = val;
>>
>> +#ifndef CONFIG_CPU_IDLE
>> +	if (option ==&sleep_while_idle)
>> +		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
>> +#endif
>> +
>>   	if (option ==&enable_off_mode) {
>>   		if (val)
>>   			omap_pm_enable_off_mode();


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

* [PATCH] OMAP2+: PM: Warn users of sleep_while_idle if !CONFIG_CPU_IDLE
@ 2011-03-03  9:32     ` Rajendra Nayak
  0 siblings, 0 replies; 6+ messages in thread
From: Rajendra Nayak @ 2011-03-03  9:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 02 March 2011 03:24 AM, Kevin Hilman wrote:
> Rajendra Nayak<rnayak@ti.com>  writes:
>
>> This should help users who do a
>> 'echo 1>  /debug/pm_debug/sleep_while_idle' with a
>> config which has !CONFIG_CPU_IDLE and wonder
>> why OMAP is'nt sleeping in idle.
>
> This isn't quite right, as 'sleep_while_idle' is actually a flag for
> whether or not to call omap_sram_idle() at all.

Hi Kevin,

I know this is used in 'omap3_pm_idle' as well
to decide whether or not to call omap_sram_idle() but
I was'nt quite sure what omap3_pm_idle is expected to do
in the first place.
We end up calling omap_sram_idle here without really
programming any target state. Do we really need this to
happen, instead can't we just rely on ARM generic code
to do a WFI in case we don't have cpuidle support enabled?

regards,
Rajendra

>
> Even without CPUidle, WFI will still be attempted.
>
> Kevin
>
>> Signed-off-by: Rajendra Nayak<rnayak@ti.com>
>> ---
>>   arch/arm/mach-omap2/pm-debug.c |    9 +++++++++
>>   1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
>> index 125f565..1e722a0 100644
>> --- a/arch/arm/mach-omap2/pm-debug.c
>> +++ b/arch/arm/mach-omap2/pm-debug.c
>> @@ -569,6 +569,10 @@ static int option_get(void *data, u64 *val)
>>
>>   	*val = *option;
>>
>> +#ifndef CONFIG_CPU_IDLE
>> +	if (option ==&sleep_while_idle)
>> +		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
>> +#endif
>>   	return 0;
>>   }
>>
>> @@ -581,6 +585,11 @@ static int option_set(void *data, u64 val)
>>
>>   	*option = val;
>>
>> +#ifndef CONFIG_CPU_IDLE
>> +	if (option ==&sleep_while_idle)
>> +		pr_warn("CONFIG_CPU_IDLE is not enabled\n");
>> +#endif
>> +
>>   	if (option ==&enable_off_mode) {
>>   		if (val)
>>   			omap_pm_enable_off_mode();

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

end of thread, other threads:[~2011-03-03  9:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-16 12:04 [PATCH] OMAP2+: PM: Warn users of sleep_while_idle if !CONFIG_CPU_IDLE Rajendra Nayak
2011-02-16 12:04 ` Rajendra Nayak
2011-03-01 21:54 ` Kevin Hilman
2011-03-01 21:54   ` Kevin Hilman
2011-03-03  9:32   ` Rajendra Nayak
2011-03-03  9:32     ` Rajendra Nayak

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