Skip to contentSkip to conversation

cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning

PATCH New Daniel Lezcano 4 participants 7 messages Jun 7, 2013 – Jun 10, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning

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.

---
 arch/arm/mach-omap2/Kconfig |    2 +-
 arch/arm/mach-tegra/Kconfig |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -1
index f49cd51..831e89e 100644
@@ -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
arch/arm/mach-tegra/Kconfig +1 -1
index 84d72fc..04c6221 100644
@@ -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
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning

Looping Colin,

Quoted 19 lines · Daniel Lezcano

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.

---
 arch/arm/mach-omap2/Kconfig |    2 +-
 arch/arm/mach-tegra/Kconfig |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/Kconfig +0 -0
index f49cd51..831e89e 100644

arch/arm/mach-omap2/Kconfig config ARCH_OMAP4 · line 86

Quoted 5 lines
arch/arm/mach-omap2/Kconfig +1 -1
@@ -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

#2 lore raw

PATCH 1/1 cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning

Quoted 5 lines · Santosh Shilimkar
Quoted 5 lines
arch/arm/mach-omap2/Kconfig +0 -0
index f49cd51..831e89e 100644
@@ -83,7 +83,7 @@ config ARCH_OMAP4
Quoted 8 lines

arch/arm/mach-omap2/Kconfig config ARCH_OMAP4 · line 86

Quoted 5 lines
arch/arm/mach-omap2/Kconfig +1 -1
      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

#3 lore raw

PATCH 1/1 cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning

Quoted 15 lines · Arnd Bergmann
Quoted 5 lines · Santosh Shilimkar
Quoted 5 lines
arch/arm/mach-omap2/Kconfig +0 -0
index f49cd51..831e89e 100644
@@ -83,7 +83,7 @@ config ARCH_OMAP4
Quoted 8 lines

arch/arm/mach-omap2/Kconfig config ARCH_OMAP4 · line 86

Quoted 5 lines
arch/arm/mach-omap2/Kconfig +1 -1
      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]

Quoted 9 lines

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

#4 lore raw

PATCH 1/1 cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning

In reply to Arnd Bergmann
Quoted 16 lines · Arnd Bergmann
Quoted 5 lines · Santosh Shilimkar
Quoted 5 lines
arch/arm/mach-omap2/Kconfig +0 -0
index f49cd51..831e89e 100644
@@ -83,7 +83,7 @@ config ARCH_OMAP4
Quoted 8 lines

arch/arm/mach-omap2/Kconfig config ARCH_OMAP4 · line 86

Quoted 5 lines
arch/arm/mach-omap2/Kconfig +1 -1
      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]

Quoted 8 lines

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.

#5 lore raw

PATCH 1/1 cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning

Quoted 26 lines · Colin Cross
Quoted 16 lines · Arnd Bergmann
Quoted 5 lines · Santosh Shilimkar
Quoted 5 lines
arch/arm/mach-omap2/Kconfig +0 -0
index f49cd51..831e89e 100644
@@ -83,7 +83,7 @@ config ARCH_OMAP4
Quoted 8 lines

arch/arm/mach-omap2/Kconfig config ARCH_OMAP4 · line 86

Quoted 5 lines
arch/arm/mach-omap2/Kconfig +1 -1
      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]

Quoted 8 lines

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.

Quoted 7 lines

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

Signature · 14 lines
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

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

  * English - detected
  * English
  * French

  * English
  * French

 <javascript:void(0);>
#6 lore raw

PATCH 1/1 cpuidle: fix ARCH_NEEDS_CPU_IDLE_COUPLED dependency warning

In reply to Daniel Lezcano
Quoted 9 lines · Daniel Lezcano

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.