linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpuidle: Fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
@ 2013-06-11  8:09 Daniel Lezcano
  2013-06-11 22:42 ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2013-06-11  8:09 UTC (permalink / raw)
  To: rjw; +Cc: linux-pm, linux-arm-kernel, arnd, ccross

Before the commit d6f346f2d2bf511c2c59176121a6e42ce60173a0, the
ARCH_NEEDS_CPU_IDLE_COUPLED option was not depending on the CPU_IDLE but now
it has been moved under the CPU_IDLE menuconfig option.

That raises the following warnings:

warning: (ARCH_OMAP4 && ARCH_TEGRA_2x_SOC) selects ARCH_NEEDS_CPU_IDLE_COUPLED
which has unmet direct dependencies (CPU_IDLE)
warning: (ARCH_OMAP4 && ARCH_TEGRA_2x_SOC) selects ARCH_NEEDS_CPU_IDLE_COUPLED
which has unmet direct dependencies (CPU_IDLE)

The tegra2 and omap4 Kconfig files select this option but without checking
CPU_IDLE is set.

Fix that by moving the option out of the CPU_IDLE option.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/cpuidle/Kconfig |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
index a7d2e83..81de5d9 100644
--- a/drivers/cpuidle/Kconfig
+++ b/drivers/cpuidle/Kconfig
@@ -29,9 +29,6 @@ config CPU_IDLE_GOV_MENU
 	bool "Menu governor (for tickless system)"
 	default y
 
-config ARCH_NEEDS_CPU_IDLE_COUPLED
-	def_bool n
-
 config CPU_IDLE_CALXEDA
 	bool "CPU Idle Driver for Calxeda processors"
 	depends on ARCH_HIGHBANK
@@ -45,3 +42,6 @@ config CPU_IDLE_ZYNQ
 	  Select this to enable cpuidle on Xilinx Zynq processors.
 
 endif
+
+config ARCH_NEEDS_CPU_IDLE_COUPLED
+	def_bool n
-- 
1.7.9.5


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

* Re: [PATCH] cpuidle: Fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
  2013-06-11  8:09 [PATCH] cpuidle: Fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning Daniel Lezcano
@ 2013-06-11 22:42 ` Rafael J. Wysocki
  0 siblings, 0 replies; 9+ messages in thread
From: Rafael J. Wysocki @ 2013-06-11 22:42 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: linux-pm, linux-arm-kernel, arnd, ccross

On Tuesday, June 11, 2013 10:09:45 AM Daniel Lezcano wrote:
> Before the commit d6f346f2d2bf511c2c59176121a6e42ce60173a0, the
> ARCH_NEEDS_CPU_IDLE_COUPLED option was not depending on the CPU_IDLE but now
> it has been moved under the CPU_IDLE menuconfig option.
> 
> That raises the following warnings:
> 
> warning: (ARCH_OMAP4 && ARCH_TEGRA_2x_SOC) selects ARCH_NEEDS_CPU_IDLE_COUPLED
> which has unmet direct dependencies (CPU_IDLE)
> warning: (ARCH_OMAP4 && ARCH_TEGRA_2x_SOC) selects ARCH_NEEDS_CPU_IDLE_COUPLED
> which has unmet direct dependencies (CPU_IDLE)
> 
> The tegra2 and omap4 Kconfig files select this option but without checking
> CPU_IDLE is set.
> 
> Fix that by moving the option out of the CPU_IDLE option.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Queued up for 3.11.

Thanks,
Rafael


> ---
>  drivers/cpuidle/Kconfig |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
> index a7d2e83..81de5d9 100644
> --- a/drivers/cpuidle/Kconfig
> +++ b/drivers/cpuidle/Kconfig
> @@ -29,9 +29,6 @@ config CPU_IDLE_GOV_MENU
>  	bool "Menu governor (for tickless system)"
>  	default y
>  
> -config ARCH_NEEDS_CPU_IDLE_COUPLED
> -	def_bool n
> -
>  config CPU_IDLE_CALXEDA
>  	bool "CPU Idle Driver for Calxeda processors"
>  	depends on ARCH_HIGHBANK
> @@ -45,3 +42,6 @@ config CPU_IDLE_ZYNQ
>  	  Select this to enable cpuidle on Xilinx Zynq processors.
>  
>  endif
> +
> +config ARCH_NEEDS_CPU_IDLE_COUPLED
> +	def_bool n
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH] cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
  2013-06-10  0:38     ` Colin Cross
@ 2013-06-10  9:29       ` Daniel Lezcano
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2013-06-10  9:29 UTC (permalink / raw)
  To: Colin Cross
  Cc: Arnd Bergmann, Santosh Shilimkar, Rafael J. Wysocki, patches,
	linaro-kernel, linux-arm-kernel, Linux PM list

On 06/10/2013 02:38 AM, Colin Cross wrote:
> On Fri, Jun 7, 2013 at 9:21 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> On Friday 07 June 2013, Santosh Shilimkar wrote:
>>>> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
>>>> index f49cd51..831e89e 100644
>>>> --- a/arch/arm/mach-omap2/Kconfig
>>>> +++ b/arch/arm/mach-omap2/Kconfig
>>>> @@ -83,7 +83,7 @@ config ARCH_OMAP4
>>>>       depends on ARCH_OMAP2PLUS
>>>>       depends on ARCH_MULTI_V7
>>>>       select ARCH_HAS_OPP
>>>> -     select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
>>>> +     select ARCH_NEEDS_CPU_IDLE_COUPLED if (SMP && CPU_IDLE)
>>>
>>> I remember Colin mentioning about above dependency is taken care
>>> already in design [1]
>>
>> It's a matter of how it gets represented in Kconfig. Right now
>> the ARCH_NEEDS_CPU_IDLE_COUPLED symbol has a dependency on CPU_IDLE,
>> so we cannot select it if CPU_IDLE is not set (or get a build time
>> warning).
>>
>> I originally suggested removing the dependency, but Daniel preferred
>> to leave it there as an explicit dependency so it is required to
>> do this change instead.
> 
> ARCH_NEEDS_CPU_IDLE_COUPLED should never have been moved inside "if
> CPU_IDLE".  It was designed to be outside the CPU_IDLE dependency so
> archs could select it without having to know about its dependencies.
> Just move it back outside if CPU_IDLE in drivers/cpuidle/Kconfig and
> you won't have to mess with every arch that uses it.  If CPU_IDLE=n
> none if it will get compiled, so there is no need for the extra
> dependency.

I don't really like implicit dependencies and IMO showing them in the
Kconfig makes the life easier for someone who wants to understand what
gets compiled or not when reading the code. Even if that means to modify
a couple of Kconfig.

It is a preference and thus I don't have a strong opinion on that, so if
nobody is against I will resend a patch moving this option out of the
CPU_IDLE dep.

Thanks
  -- Daniel

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

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

  * English - detected
  * English
  * French

  * English
  * French

 <javascript:void(0);>

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

* Re: [PATCH] cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
  2013-06-07 19:21   ` Arnd Bergmann
  2013-06-07 23:21     ` Santosh Shilimkar
@ 2013-06-10  0:38     ` Colin Cross
  2013-06-10  9:29       ` Daniel Lezcano
  1 sibling, 1 reply; 9+ messages in thread
From: Colin Cross @ 2013-06-10  0:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Santosh Shilimkar, Daniel Lezcano, Rafael J. Wysocki, patches,
	linaro-kernel, linux-arm-kernel, Linux PM list

On Fri, Jun 7, 2013 at 9:21 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Friday 07 June 2013, Santosh Shilimkar wrote:
> > > diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> > > index f49cd51..831e89e 100644
> > > --- a/arch/arm/mach-omap2/Kconfig
> > > +++ b/arch/arm/mach-omap2/Kconfig
> > > @@ -83,7 +83,7 @@ config ARCH_OMAP4
> > >       depends on ARCH_OMAP2PLUS
> > >       depends on ARCH_MULTI_V7
> > >       select ARCH_HAS_OPP
> > > -     select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
> > > +     select ARCH_NEEDS_CPU_IDLE_COUPLED if (SMP && CPU_IDLE)
> >
> > I remember Colin mentioning about above dependency is taken care
> > already in design [1]
>
> It's a matter of how it gets represented in Kconfig. Right now
> the ARCH_NEEDS_CPU_IDLE_COUPLED symbol has a dependency on CPU_IDLE,
> so we cannot select it if CPU_IDLE is not set (or get a build time
> warning).
>
> I originally suggested removing the dependency, but Daniel preferred
> to leave it there as an explicit dependency so it is required to
> do this change instead.

ARCH_NEEDS_CPU_IDLE_COUPLED should never have been moved inside "if
CPU_IDLE".  It was designed to be outside the CPU_IDLE dependency so
archs could select it without having to know about its dependencies.
Just move it back outside if CPU_IDLE in drivers/cpuidle/Kconfig and
you won't have to mess with every arch that uses it.  If CPU_IDLE=n
none if it will get compiled, so there is no need for the extra
dependency.

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

* Re: [PATCH] cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
  2013-06-07 19:21   ` Arnd Bergmann
@ 2013-06-07 23:21     ` Santosh Shilimkar
  2013-06-10  0:38     ` Colin Cross
  1 sibling, 0 replies; 9+ messages in thread
From: Santosh Shilimkar @ 2013-06-07 23:21 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Daniel Lezcano, rjw, patches, linaro-kernel, linux-arm-kernel,
	linux-pm, Colin Cross

On Friday 07 June 2013 03:21 PM, Arnd Bergmann wrote:
> On Friday 07 June 2013, Santosh Shilimkar wrote:
>>> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
>>> index f49cd51..831e89e 100644
>>> --- a/arch/arm/mach-omap2/Kconfig
>>> +++ b/arch/arm/mach-omap2/Kconfig
>>> @@ -83,7 +83,7 @@ config ARCH_OMAP4
>>>       depends on ARCH_OMAP2PLUS
>>>       depends on ARCH_MULTI_V7
>>>       select ARCH_HAS_OPP
>>> -     select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
>>> +     select ARCH_NEEDS_CPU_IDLE_COUPLED if (SMP && CPU_IDLE)
>>
>> I remember Colin mentioning about above dependency is taken care
>> already in design [1]
> 
> It's a matter of how it gets represented in Kconfig. Right now 
> the ARCH_NEEDS_CPU_IDLE_COUPLED symbol has a dependency on CPU_IDLE,
> so we cannot select it if CPU_IDLE is not set (or get a build time
> warning).
> 
> I originally suggested removing the dependency, but Daniel preferred
> to leave it there as an explicit dependency so it is required to
> do this change instead.
> 
I see. Thanks for clarifying.

Regards,
Santosh


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

* Re: [PATCH] cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
  2013-06-07 17:40 [PATCH] cpuidle: fix " Daniel Lezcano
  2013-06-07 17:50 ` Santosh Shilimkar
@ 2013-06-07 19:22 ` Arnd Bergmann
  1 sibling, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2013-06-07 19:22 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: rjw, linux-arm-kernel, linux-pm, patches, linaro-kernel

On Friday 07 June 2013, Daniel Lezcano wrote:
> Before the commit d6f346f2d2bf511c2c59176121a6e42ce60173a0, the
> ARCH_NEEDS_CPU_IDLE_COUPLED option was wrongly not depending on the CPU_IDLE
> and the Kconfig for OMAP / TEGRA was not checking this dependency when setting
> the option.
> 
> With this patch, the ARCH_NEEDS_CPU_IDLE_COUPLED has been moved under the
> CPU_IDLE option. The dependency has been fixed in the relevant arch's Kconfig.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

* Re: [PATCH] cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
  2013-06-07 17:50 ` Santosh Shilimkar
@ 2013-06-07 19:21   ` Arnd Bergmann
  2013-06-07 23:21     ` Santosh Shilimkar
  2013-06-10  0:38     ` Colin Cross
  0 siblings, 2 replies; 9+ messages in thread
From: Arnd Bergmann @ 2013-06-07 19:21 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Daniel Lezcano, rjw, patches, linaro-kernel, linux-arm-kernel,
	linux-pm, Colin Cross

On Friday 07 June 2013, Santosh Shilimkar wrote:
> > diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> > index f49cd51..831e89e 100644
> > --- a/arch/arm/mach-omap2/Kconfig
> > +++ b/arch/arm/mach-omap2/Kconfig
> > @@ -83,7 +83,7 @@ config ARCH_OMAP4
> >       depends on ARCH_OMAP2PLUS
> >       depends on ARCH_MULTI_V7
> >       select ARCH_HAS_OPP
> > -     select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
> > +     select ARCH_NEEDS_CPU_IDLE_COUPLED if (SMP && CPU_IDLE)
>
> I remember Colin mentioning about above dependency is taken care
> already in design [1]

It's a matter of how it gets represented in Kconfig. Right now 
the ARCH_NEEDS_CPU_IDLE_COUPLED symbol has a dependency on CPU_IDLE,
so we cannot select it if CPU_IDLE is not set (or get a build time
warning).

I originally suggested removing the dependency, but Daniel preferred
to leave it there as an explicit dependency so it is required to
do this change instead.

	Arnd

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

* Re: [PATCH] cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
  2013-06-07 17:40 [PATCH] cpuidle: fix " Daniel Lezcano
@ 2013-06-07 17:50 ` Santosh Shilimkar
  2013-06-07 19:21   ` Arnd Bergmann
  2013-06-07 19:22 ` Arnd Bergmann
  1 sibling, 1 reply; 9+ messages in thread
From: Santosh Shilimkar @ 2013-06-07 17:50 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: rjw, arnd, patches, linaro-kernel, linux-arm-kernel, linux-pm,
	Colin Cross

Looping Colin,

On Friday 07 June 2013 01:40 PM, Daniel Lezcano wrote:
> Before the commit d6f346f2d2bf511c2c59176121a6e42ce60173a0, the
> ARCH_NEEDS_CPU_IDLE_COUPLED option was wrongly not depending on the CPU_IDLE
> and the Kconfig for OMAP / TEGRA was not checking this dependency when setting
> the option.
> 
> With this patch, the ARCH_NEEDS_CPU_IDLE_COUPLED has been moved under the
> CPU_IDLE option. The dependency has been fixed in the relevant arch's Kconfig.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  arch/arm/mach-omap2/Kconfig |    2 +-
>  arch/arm/mach-tegra/Kconfig |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index f49cd51..831e89e 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -83,7 +83,7 @@ config ARCH_OMAP4
>  	depends on ARCH_OMAP2PLUS
>  	depends on ARCH_MULTI_V7
>  	select ARCH_HAS_OPP
> -	select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
> +	select ARCH_NEEDS_CPU_IDLE_COUPLED if (SMP && CPU_IDLE)
I remember Colin mentioning about above dependency is taken care
already in design [1]

Regards,
Santosh

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-March/092080.html


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

* [PATCH] cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning
@ 2013-06-07 17:40 Daniel Lezcano
  2013-06-07 17:50 ` Santosh Shilimkar
  2013-06-07 19:22 ` Arnd Bergmann
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Lezcano @ 2013-06-07 17:40 UTC (permalink / raw)
  To: rjw, arnd; +Cc: linux-arm-kernel, linux-pm, patches, linaro-kernel

Before the commit d6f346f2d2bf511c2c59176121a6e42ce60173a0, the
ARCH_NEEDS_CPU_IDLE_COUPLED option was wrongly not depending on the CPU_IDLE
and the Kconfig for OMAP / TEGRA was not checking this dependency when setting
the option.

With this patch, the ARCH_NEEDS_CPU_IDLE_COUPLED has been moved under the
CPU_IDLE option. The dependency has been fixed in the relevant arch's Kconfig.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/mach-omap2/Kconfig |    2 +-
 arch/arm/mach-tegra/Kconfig |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index f49cd51..831e89e 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -83,7 +83,7 @@ config ARCH_OMAP4
 	depends on ARCH_OMAP2PLUS
 	depends on ARCH_MULTI_V7
 	select ARCH_HAS_OPP
-	select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
+	select ARCH_NEEDS_CPU_IDLE_COUPLED if (SMP && CPU_IDLE)
 	select ARM_CPU_SUSPEND if PM
 	select ARM_ERRATA_720789
 	select ARM_GIC
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 84d72fc..04c6221 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -23,7 +23,7 @@ menu "NVIDIA Tegra options"
 
 config ARCH_TEGRA_2x_SOC
 	bool "Enable support for Tegra20 family"
-	select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
+	select ARCH_NEEDS_CPU_IDLE_COUPLED if (SMP && CPU_IDLE)
 	select ARM_ERRATA_720789
 	select ARM_ERRATA_754327 if SMP
 	select ARM_ERRATA_764369 if SMP
-- 
1.7.9.5


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

end of thread, other threads:[~2013-06-11 22:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11  8:09 [PATCH] cpuidle: Fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning Daniel Lezcano
2013-06-11 22:42 ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2013-06-07 17:40 [PATCH] cpuidle: fix " Daniel Lezcano
2013-06-07 17:50 ` Santosh Shilimkar
2013-06-07 19:21   ` Arnd Bergmann
2013-06-07 23:21     ` Santosh Shilimkar
2013-06-10  0:38     ` Colin Cross
2013-06-10  9:29       ` Daniel Lezcano
2013-06-07 19:22 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).