2014-04-02 01:25:18

by Josh Boyer

[permalink] [raw]
Subject: arm64/cqufreq Kconfig error with v3.14-3893-gc12e69c6aaf7

Hi All,

When running make listnewconfig/oldconfig on the config below with
Linus' latest tree, I keep seeing this error message spit out:

drivers/cpufreq/Kconfig:57:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:65:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:74:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:83:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:95:warning: choice value used outside its choice group

At the moment I'm only seeing this on arm64 but I have no idea why.
Does anyone else?

josh


Attachments:
aarch64.config (97.14 kB)

2014-04-02 05:06:45

by Viresh Kumar

[permalink] [raw]
Subject: Re: arm64/cqufreq Kconfig error with v3.14-3893-gc12e69c6aaf7

On 2 April 2014 06:55, Josh Boyer <[email protected]> wrote:
> Hi All,
>
> When running make listnewconfig/oldconfig on the config below with
> Linus' latest tree, I keep seeing this error message spit out:
>
> drivers/cpufreq/Kconfig:57:warning: choice value used outside its choice group
> drivers/cpufreq/Kconfig:65:warning: choice value used outside its choice group
> drivers/cpufreq/Kconfig:74:warning: choice value used outside its choice group
> drivers/cpufreq/Kconfig:83:warning: choice value used outside its choice group
> drivers/cpufreq/Kconfig:95:warning: choice value used outside its choice group
>
> At the moment I'm only seeing this on arm64 but I have no idea why.
> Does anyone else?

Hmm, there are two entries for this present in: arch/arm64/Kconfig

+source "drivers/cpufreq/Kconfig"

You can see that here in Linus's merge: 4dedde

Probably both Rafael and Catalin were carrying this change..

--
viresh

2014-04-02 14:40:42

by Josh Boyer

[permalink] [raw]
Subject: [PATCH] arm64: Fix duplicated Kconfig entries again

Commit 74397174989e5f70 attempted to clean up the power management options
for arm64, but when things were merged it didn't fully take effect. Fix
it again.

Signed-off-by: Josh Boyer <[email protected]>
---
arch/arm64/Kconfig | 6 ------
1 file changed, 6 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 07aa3556952c..8033b9b8a2df 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -321,12 +321,6 @@ menu "CPU Power Management"

source "drivers/cpuidle/Kconfig"

-source "drivers/cpufreq/Kconfig"
-
-endmenu
-
-menu "Power management options"
-
source "kernel/power/Kconfig"

source "drivers/cpufreq/Kconfig"
--
1.8.5.3

2014-04-03 04:23:58

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH] arm64: Fix duplicated Kconfig entries again

On Wed, Apr 2, 2014 at 8:10 PM, Josh Boyer <[email protected]> wrote:
> Commit 74397174989e5f70 attempted to clean up the power management options
> for arm64, but when things were merged it didn't fully take effect. Fix
> it again.
>
> Signed-off-by: Josh Boyer <[email protected]>
> ---
> arch/arm64/Kconfig | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 07aa3556952c..8033b9b8a2df 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -321,12 +321,6 @@ menu "CPU Power Management"
>
> source "drivers/cpuidle/Kconfig"
>
> -source "drivers/cpufreq/Kconfig"
> -
> -endmenu
> -
> -menu "Power management options"
> -
> source "kernel/power/Kconfig"
>
> source "drivers/cpufreq/Kconfig"

Reviewed-by: Viresh Kumar <[email protected]>

2014-04-03 08:36:05

by Hanjun Guo

[permalink] [raw]
Subject: Re: [PATCH] arm64: Fix duplicated Kconfig entries again

Hi Rafael,

Sorry the late reply.

On 2014-3-27 23:18, Rafael J. Wysocki wrote:
[...]
>>> Just had a look at the linux-next tree and looks like the original commit:
>>> "cpufreq: enable ARM drivers on arm64" is pulled by both Catalin and Rafael
>>> which has resulted in the fixup patch[1] not removing the duplicate entry
>>> cleanly.
>>>
>>> If not too late it better to ask either Rafael or Catalin to drop both patches
>>> from their tree, instead of creating 4 patches in total to enable cpufreq :)
>>
>> Rafael is on vacation now.
>>
>> Catalin, could you please handle this?
>
> Well, not really, I'm at a conference now.

Oops...

>
> Anyway, I'd rather not drop anything, but if you send me a revert, I can apply it.

Mark Brown sent another patch to fix this problem, and that patch already merged
into mainline, but the problem is still there, so I think a single revert will
not help.

How about the following patch? if it is ok, I will resend it.

After commit 74397174989e5 (arm64: Fix duplicated Kconfig entries),
I still get a duplicate Power management options section in linux-next
git repo, may be due to some merge conflicts, anyway, fix that in this
patch.

Signed-off-by: Hanjun Guo <[email protected]>
---
Based on linux-next repo, weird, did I miss something?
---
arch/arm64/Kconfig | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index d9f23ad..6085dca 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -317,24 +317,12 @@ config ARCH_SUSPEND_POSSIBLE
config ARM64_CPU_SUSPEND
def_bool PM_SLEEP

-endmenu
-
-menu "CPU Power Management"
-
source "drivers/cpuidle/Kconfig"

source "drivers/cpufreq/Kconfig"

endmenu

-menu "Power management options"
-
-source "kernel/power/Kconfig"
-
-source "drivers/cpufreq/Kconfig"
-
-endmenu
-
source "net/Kconfig"

source "drivers/Kconfig"

2014-04-03 08:42:01

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH] arm64: Fix duplicated Kconfig entries again

On Thu, Apr 3, 2014 at 2:05 PM, Hanjun Guo <[email protected]> wrote:
> How about the following patch? if it is ok, I will resend it.

http://www.spinics.net/lists/arm-kernel/msg319545.html

2014-04-03 08:51:49

by Catalin Marinas

[permalink] [raw]
Subject: Re: [PATCH] arm64: Fix duplicated Kconfig entries again

On Thu, Apr 03, 2014 at 09:41:57AM +0100, Viresh Kumar wrote:
> On Thu, Apr 3, 2014 at 2:05 PM, Hanjun Guo <[email protected]> wrote:
> > How about the following patch? if it is ok, I will resend it.
>
> http://www.spinics.net/lists/arm-kernel/msg319545.html

I can see commit 62d1a3ba5adc5653d43f6cd3a90758bb6ad5d5bd (arm64: Fix
duplicated Kconfig entries again) already in mainline, so problem
solved.

Thanks Josh ;)

--
Catalin

2014-04-03 09:27:56

by Hanjun Guo

[permalink] [raw]
Subject: Re: [PATCH] arm64: Fix duplicated Kconfig entries again

On 2014-4-3 16:51, Catalin Marinas wrote:
> On Thu, Apr 03, 2014 at 09:41:57AM +0100, Viresh Kumar wrote:
>> On Thu, Apr 3, 2014 at 2:05 PM, Hanjun Guo <[email protected]> wrote:
>>> How about the following patch? if it is ok, I will resend it.
>>
>> http://www.spinics.net/lists/arm-kernel/msg319545.html
>
> I can see commit 62d1a3ba5adc5653d43f6cd3a90758bb6ad5d5bd (arm64: Fix
> duplicated Kconfig entries again) already in mainline, so problem
> solved.
>
> Thanks Josh ;)

Great, thanks Viresh to let me know this.
Actually I also sent a patch named "arm64: Fix duplicated Kconfig entries
again" about one week ago :)

https://www.mail-archive.com/[email protected]/msg612363.html

And I think there is still a problem after commit 62d1a3ba - multi-entries
for source "kernel/power/Kconfig", so how about the following fix?

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index e6e4d37..6085dca 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -317,14 +317,8 @@ config ARCH_SUSPEND_POSSIBLE
config ARM64_CPU_SUSPEND
def_bool PM_SLEEP

-endmenu
-
-menu "CPU Power Management"
-
source "drivers/cpuidle/Kconfig"

-source "kernel/power/Kconfig"
-
source "drivers/cpufreq/Kconfig"

endmenu

If it makes sense, I will send out a patch for it.

Thanks
Hanjun

2014-04-03 09:30:58

by Hanjun Guo

[permalink] [raw]
Subject: Re: [PATCH] arm64: Fix duplicated Kconfig entries again

On 2014-4-3 17:27, Hanjun Guo wrote:
> On 2014-4-3 16:51, Catalin Marinas wrote:
>> On Thu, Apr 03, 2014 at 09:41:57AM +0100, Viresh Kumar wrote:
>>> On Thu, Apr 3, 2014 at 2:05 PM, Hanjun Guo <[email protected]> wrote:
>>>> How about the following patch? if it is ok, I will resend it.
>>>
>>> http://www.spinics.net/lists/arm-kernel/msg319545.html
>>
>> I can see commit 62d1a3ba5adc5653d43f6cd3a90758bb6ad5d5bd (arm64: Fix
>> duplicated Kconfig entries again) already in mainline, so problem
>> solved.
>>
>> Thanks Josh ;)

I just noticed Josh's patch half a hour ago, that's why I didn't review it...

2014-04-03 09:38:48

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH] arm64: Fix duplicated Kconfig entries again

On 3 April 2014 14:57, Hanjun Guo <[email protected]> wrote:
> Great, thanks Viresh to let me know this.
> Actually I also sent a patch named "arm64: Fix duplicated Kconfig entries
> again" about one week ago :)
>
> https://www.mail-archive.com/[email protected]/msg612363.html
>
> And I think there is still a problem after commit 62d1a3ba - multi-entries
> for source "kernel/power/Kconfig", so how about the following fix?

I didn't notice that :)

> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index e6e4d37..6085dca 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -317,14 +317,8 @@ config ARCH_SUSPEND_POSSIBLE
> config ARM64_CPU_SUSPEND
> def_bool PM_SLEEP
>
> -endmenu
> -
> -menu "CPU Power Management"
> -
> source "drivers/cpuidle/Kconfig"
>
> -source "kernel/power/Kconfig"
> -
> source "drivers/cpufreq/Kconfig"
>
> endmenu
>
> If it makes sense, I will send out a patch for it.

We actually need to menu options here,
menu "Power management options"
menu "CPU Power Management"

And so probably you just need to do this:
> -source "kernel/power/Kconfig"
> -

from CPU Power Management options..

2014-04-03 11:02:02

by Hanjun Guo

[permalink] [raw]
Subject: Re: [PATCH] arm64: Fix duplicated Kconfig entries again

On 2014-4-3 17:38, Viresh Kumar wrote:
> On 3 April 2014 14:57, Hanjun Guo <[email protected]> wrote:
>> Great, thanks Viresh to let me know this.
>> Actually I also sent a patch named "arm64: Fix duplicated Kconfig entries
>> again" about one week ago :)
>>
>> https://www.mail-archive.com/[email protected]/msg612363.html
>>
>> And I think there is still a problem after commit 62d1a3ba - multi-entries
>> for source "kernel/power/Kconfig", so how about the following fix?
>
> I didn't notice that :)
>
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index e6e4d37..6085dca 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -317,14 +317,8 @@ config ARCH_SUSPEND_POSSIBLE
>> config ARM64_CPU_SUSPEND
>> def_bool PM_SLEEP
>>
>> -endmenu
>> -
>> -menu "CPU Power Management"
>> -
>> source "drivers/cpuidle/Kconfig"
>>
>> -source "kernel/power/Kconfig"
>> -
>> source "drivers/cpufreq/Kconfig"
>>
>> endmenu
>>
>> If it makes sense, I will send out a patch for it.
>
> We actually need to menu options here,
> menu "Power management options"
> menu "CPU Power Management"
>
> And so probably you just need to do this:
>> -source "kernel/power/Kconfig"
>> -
>
> from CPU Power Management options..

Ok, will send out a patch later.

Thanks
Hanjun