linux-config.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Kconfig entry defined multiple times
@ 2012-08-22  8:05 gwr
  2012-08-22  8:42 ` gwr
  2012-08-22  8:45 ` gwr
  0 siblings, 2 replies; 4+ messages in thread
From: gwr @ 2012-08-22  8:05 UTC (permalink / raw)
  To: linux-config

Hello,

I am working on kernel 2.6.32.38, and I see :

~~~~~~~~~~~~~~~~~~~~~~~~~~

arch/x86/Kconfig, 202 :
=============

config USE_GENERIC_SMP_HELPERS
     def_bool y
     depends on SMP

~~~~~~~~~~~~~~~~~~~~~~~~~~

arch/Kconfig, 112 :
===========

config USE_GENERIC_SMP_HELPERS
     bool

~~~~~~~~~~~~~~~~~~~~~~~~~~

Although we have this in Kconfig documentation,
================================================
A config option can be defined multiple times with the same name, but every
definition can have only a single input prompt and the type must not 
conflict.
================================================

here,
   - the first definition is a child of "Linux Kernel Configuration for 
x86" MainMenu ( arch/x86/Kconfig, 1 )
   - the second definition is a child of "General setup" Menu ( 
init/Kconfig, 24 )

So the hierarchy is different ; Can someone give explanations on this ?

Thx

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

* Re: Kconfig entry defined multiple times
  2012-08-22  8:05 Kconfig entry defined multiple times gwr
@ 2012-08-22  8:42 ` gwr
  2012-08-22  8:45 ` gwr
  1 sibling, 0 replies; 4+ messages in thread
From: gwr @ 2012-08-22  8:42 UTC (permalink / raw)
  Cc: linux-config


On 08/22/2012 10:05 AM, gwr wrote:
> Hello,
>
> I am working on kernel 2.6.32.38, and I see :
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> arch/x86/Kconfig, 202 :
> =============
>
> config USE_GENERIC_SMP_HELPERS
>     def_bool y
>     depends on SMP
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> arch/Kconfig, 112 :
> ===========
>
> config USE_GENERIC_SMP_HELPERS
>     bool
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Although we have this in Kconfig documentation,
> ================================================
> A config option can be defined multiple times with the same name, but 
> every
> definition can have only a single input prompt and the type must not 
> conflict.
> ================================================
>
> here,
>   - the first definition is a child of "Linux Kernel Configuration for 
> x86" MainMenu ( arch/x86/Kconfig, 1 )
>   - the second definition is a child of "General setup" Menu ( 
> init/Kconfig, 24 )
>
> So the hierarchy is different ; Can someone give explanations on this ?
>
> Thx

I forgot the second half on my message :

- I am trying to build a linux kernel configurator that do not need to 
reparse
   all the kernel Kconfig input at each entry modification

- the problem :

   -- if I keep the 2 entries as separates objects, I cant choose 
between the 2 at
     expression evaluation time,because the second definition has no 
dependancy.

   -- the second definition has no dependancy => it suggest that the
     2 entries have to be joined into a single entry. But at which place 
in the hierarchy ?

( note  : a "make gconfig" ends up with 2 different 
USE_GENERIC_SMP_HELPERS entries in the tree )



Now consider the X86_EXTENDED_PLATFORM entry :

~~~~~~~~~~~~~~~~~~~~~~~~~~

arch/x86/Kconfig,312 :
=============

if X86_32
config X86_EXTENDED_PLATFORM
     bool "Support for extended (non-PC) x86 platforms"
     default y
     ---help---
( ...help text 1... )
endif

if X86_64
config X86_EXTENDED_PLATFORM
     bool "Support for extended (non-PC) x86 platforms"
     default y
     ---help---
( ...help text 2... )
endif

~~~~~~~~~~~~~~~~~~~~~~~~~~

the dependancies are mutually exclusive.




So in fact, the real question I ask is : could not be Kconfig grammar 
simplified, by adding some restricting rules ?

Thx


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

* Re: Kconfig entry defined multiple times
  2012-08-22  8:05 Kconfig entry defined multiple times gwr
  2012-08-22  8:42 ` gwr
@ 2012-08-22  8:45 ` gwr
  2012-08-22  8:59   ` gwr
  1 sibling, 1 reply; 4+ messages in thread
From: gwr @ 2012-08-22  8:45 UTC (permalink / raw)
  To: linux-config


On 08/22/2012 10:05 AM, gwr wrote:
> Hello,
>
> I am working on kernel 2.6.32.38, and I see :
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> arch/x86/Kconfig, 202 :
> =============
>
> config USE_GENERIC_SMP_HELPERS
>     def_bool y
>     depends on SMP
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> arch/Kconfig, 112 :
> ===========
>
> config USE_GENERIC_SMP_HELPERS
>     bool
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Although we have this in Kconfig documentation,
> ================================================
> A config option can be defined multiple times with the same name, but 
> every
> definition can have only a single input prompt and the type must not 
> conflict.
> ================================================
>
> here,
>   - the first definition is a child of "Linux Kernel Configuration for 
> x86" MainMenu ( arch/x86/Kconfig, 1 )
>   - the second definition is a child of "General setup" Menu ( 
> init/Kconfig, 24 )
>
> So the hierarchy is different ; Can someone give explanations on this ?
>
> Thx
> -- 
> To unsubscribe from this list: send the line "unsubscribe 
> linux-config" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

I forgot the second half on my message :

- I am trying to build a linux kernel configurator that do not need to 
reparse
   all the kernel Kconfig input at each entry modification

- the problem :

   -- if I keep the 2 entries as separates objects, I cant choose 
between the 2 at
     expression evaluation time,because the second definition has no 
dependancy.

   -- the second definition has no dependancy => it suggest that the
     2 entries have to be joined into a single entry. But at which place 
in the hierarchy ?

( note  : a "make gconfig" ends up with 2 different 
USE_GENERIC_SMP_HELPERS entries in the tree )



Now consider the X86_EXTENDED_PLATFORM entry :

~~~~~~~~~~~~~~~~~~~~~~~~~~

arch/x86/Kconfig,312 :
=============

if X86_32
config X86_EXTENDED_PLATFORM
     bool "Support for extended (non-PC) x86 platforms"
     default y
     ---help---
( ...help text 1... )
endif

if X86_64
config X86_EXTENDED_PLATFORM
     bool "Support for extended (non-PC) x86 platforms"
     default y
     ---help---
( ...help text 2... )
endif

~~~~~~~~~~~~~~~~~~~~~~~~~~

the dependancies are mutually exclusive.




So in fact, the real question I ask is : could not be Kconfig grammar 
simplified, by adding some restricting rules ?

Thx


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

* Re: Kconfig entry defined multiple times
  2012-08-22  8:45 ` gwr
@ 2012-08-22  8:59   ` gwr
  0 siblings, 0 replies; 4+ messages in thread
From: gwr @ 2012-08-22  8:59 UTC (permalink / raw)
  To: linux-config


On 08/22/2012 10:45 AM, gwr wrote:
>
> On 08/22/2012 10:05 AM, gwr wrote:
>> Hello,
>>
>> I am working on kernel 2.6.32.38, and I see :
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> arch/x86/Kconfig, 202 :
>> =============
>>
>> config USE_GENERIC_SMP_HELPERS
>>     def_bool y
>>     depends on SMP
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> arch/Kconfig, 112 :
>> ===========
>>
>> config USE_GENERIC_SMP_HELPERS
>>     bool
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Although we have this in Kconfig documentation,
>> ================================================
>> A config option can be defined multiple times with the same name, but 
>> every
>> definition can have only a single input prompt and the type must not 
>> conflict.
>> ================================================
>>
>> here,
>>   - the first definition is a child of "Linux Kernel Configuration 
>> for x86" MainMenu ( arch/x86/Kconfig, 1 )
>>   - the second definition is a child of "General setup" Menu ( 
>> init/Kconfig, 24 )
>>
>> So the hierarchy is different ; Can someone give explanations on this ?
>>
>> Thx
>> -- 
>> To unsubscribe from this list: send the line "unsubscribe 
>> linux-config" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> I forgot the second half on my message :
>
> - I am trying to build a linux kernel configurator that do not need to 
> reparse
>   all the kernel Kconfig input at each entry modification
>
> - the problem :
>
>   -- if I keep the 2 entries as separates objects, I cant choose 
> between the 2 at
>     expression evaluation time,because the second definition has no 
> dependancy.
>
>   -- the second definition has no dependancy => it suggest that the
>     2 entries have to be joined into a single entry. But at which 
> place in the hierarchy ?
>
> ( note  : a "make gconfig" ends up with 2 different 
> USE_GENERIC_SMP_HELPERS entries in the tree )
>
>
>
> Now consider the X86_EXTENDED_PLATFORM entry :
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> arch/x86/Kconfig,312 :
> =============
>
> if X86_32
> config X86_EXTENDED_PLATFORM
>     bool "Support for extended (non-PC) x86 platforms"
>     default y
>     ---help---
> ( ...help text 1... )
> endif
>
> if X86_64
> config X86_EXTENDED_PLATFORM
>     bool "Support for extended (non-PC) x86 platforms"
>     default y
>     ---help---
> ( ...help text 2... )
> endif
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> the dependancies are mutually exclusive.
>
>
>
>
> So in fact, the real question I ask is : could not be Kconfig grammar 
> simplified, by adding some restricting rules ?
>
> Thx
>
Simplification could be NOT ALLOWING multiple entries with the same 
name, I counted
only 14 "entries with duplicate name" in my 2.6.32.38 kernel, among many 
thousands entries.

Example : X86_EXTENDED_PLATFORM could easily redeclared simply by 
allowing dependancies to help texts.

Thx

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

end of thread, other threads:[~2012-08-22  8:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-22  8:05 Kconfig entry defined multiple times gwr
2012-08-22  8:42 ` gwr
2012-08-22  8:45 ` gwr
2012-08-22  8:59   ` gwr

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).