01 Jul, 2011

1 commit

  • Make conf_write_symbol() grammar agnostic to be able to use it from different
    code path. These path pass a printer callback which will print a symbol's name
    and its value in different format.

    conf_write_symbol()'s job become mostly only to prepare a string for the
    printer. This avoid to have to pass specialized flag to generic
    functions

    Signed-off-by: Arnaud Lacombe
    [mmarek: rebased on top of de12518 (kconfig: autogenerated config_is_xxx
    macro)]
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     

07 Jun, 2011

1 commit


11 Jan, 2011

1 commit

  • * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    nconf: handle comment entries within choice/endchoice
    kconfig: fix warning
    kconfig: Make expr_copy() take a const argument
    kconfig: simplify select-with-unmet-direct-dependency warning
    kconfig: add more S_INT and S_HEX consistency checks
    kconfig: fix `zconfdebug' extern declaration
    kconfig/conf: merge duplicate switch's case
    kconfig: fix typos
    kbuild/gconf: add dummy inline for bind_textdomain_codeset()
    kbuild/nconf: fix spaces damage
    kconfig: nuke second argument of conf_write_symbol()
    kconfig: do not define AUTOCONF_INCLUDED
    kconfig: the day kconfig warns about "select"-abuse has come

    Linus Torvalds
     

22 Dec, 2010

1 commit

  • This is an attempt to simplify the expressing printed by kconfig when a
    symbol is selected but still has direct unmet dependency.

    First, the symbol reverse dependency is split in sub-expression. Then,
    each sub-expression is checked to ensure that it does not contains the
    unmet dependency. This removes the false-positive symbols and fixed symbol
    which already have the correct dependency. Finally, only the symbol
    responsible of the "select" is printed, instead of its full dependency tree.

    CC: Catalin Marinas
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     

15 Dec, 2010

1 commit


02 Nov, 2010

1 commit


12 Oct, 2010

2 commits


10 Oct, 2010

1 commit

  • After fixing a use-after-free bug in kconfig, a 'make defconfig' or
    'make allmodconfig' fills the screen with warnings that were not
    detected before. Given that we are close to the release now, disable the
    warnings temporarily and deal with them after 2.6.36.

    Signed-off-by: Michal Marek

    Michal Marek
     

01 Oct, 2010

1 commit


20 Sep, 2010

1 commit


15 Aug, 2010

1 commit

  • Following sample Kconfig generated a segfault:

    config FOO
    bool
    select PERF_EVENTS if HAVE_HW_BREAKPOINT

    config PERF_EVENTS
    bool

    config HAVE_HW_BREAKPOINT
    bool
    depends on PERF_EVENTS

    Fix by reverting back to a valid property if there was no
    property on the stack of symbols.

    The above pattern were seen in sh Kconfig.
    A fix for the Kconfig file has been sent to the sh folks.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Sam Ravnborg
     

03 Aug, 2010

4 commits

  • savedefconfig will save a minimal config to a file
    named "defconfig".

    The config symbols are saved in the same order as
    they appear in the menu structure so it should
    be possible to map them to the relevant menus
    if desired.

    The implementation was tested against several minimal
    configs for arm which was created using brute-force.

    There was one regression related to default numbers
    which had their valid range further limited by another symbol.

    Sample:

    config FOO
    int "foo"
    default 4

    config BAR
    int "bar"
    range 0 FOO

    If FOO is set to 3 then BAR cannot take a value higher than 3.
    But the current implementation will set BAR equal to 4.

    This is seldomly used and the final configuration is OK,
    and the fix was non-trivial.
    So it was documented in the code and left as is.

    Signed-off-by: Sam Ravnborg
    Acked-by: Uwe Kleine-König
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • Move logic to determine default for a choice to
    a separate function.
    No functional changes.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • Consider following kconfig file:

    config TEST1
    bool "test 1"
    depends on TEST2

    config TEST2
    bool "test 2"
    depends on TEST1

    Previously kconfig would report:

    foo:6:error: found recursive dependency: TEST2 -> TEST1 -> TEST2

    With the following patch kconfig reports:
    foo:5:error: recursive dependency detected!
    foo:5: symbol TEST2 depends on TEST1
    foo:1: symbol TEST1 depends on TEST2

    Note that we now report where the offending symbols are defined.
    This can be a great help for complex situations involving
    several files.

    Patch is originally from Roman Zippel with a few adjustments by Sam.

    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel
    Signed-off-by: Michal Marek

    Roman Zippel
     
  • When we add a new config symbol save the file/line
    so we later can refer to their location.

    The information is saved as a property to a config symbol
    because we may have multiple definitions of the same symbol.

    This has the side-effect that a symbol always has
    at least one property.

    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel
    Signed-off-by: Michal Marek

    Sam Ravnborg
     

08 Jul, 2010

1 commit

  • This makes it so "make oldconfig" really prompts for any choice where
    options that previously weren't visible just became so. Previously one
    would have to remember to go over all choice values and check whether
    some that previously couldn't be selected now can be.

    Signed-off-by: Jan Beulich
    Signed-off-by: Michal Marek

    Jan Beulich
     

02 Jul, 2010

1 commit

  • The "select" statement in Kconfig files allows the enabling of options
    even if they have unmet direct dependencies (i.e. "depends on" expands
    to "no"). Currently, the "depends on" clauses are used in calculating
    the visibility but they do not affect the reverse dependencies in any
    way.

    The patch introduces additional tracking of the "depends on" statements
    and prints a warning on selecting an option if its direct dependencies
    are not met.

    Signed-off-by: Catalin Marinas
    Cc: Sam Ravnborg
    Cc: Arnd Bergmann
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Signed-off-by: Michal Marek

    Catalin Marinas
     

23 Mar, 2010

1 commit

  • A symbol's value won't be recalc-ed until we save config file or
    enter the menu where the symbol sits.

    So If I enable OPTIMIZE_FOR_SIZE, and search FUNCTION_GRAPH_TRACER:

    Symbol: FUNCTION_GRAPH_TRACER [=y]
    Prompt: Kernel Function Graph Tracer
    Defined at kernel/trace/Kconfig:140
    Depends on: ... [=y] && (!X86_32 [=y] || !CC_OPTIMIZE_FOR_SIZE [=y])
    ...

    From the dependency it should result in FUNCTION_GRAPH_TRACER=n,
    but it still shows FUNCTION_GRAPH_TRACER=y.

    Signed-off-by: Li Zefan
    Signed-off-by: Michal Marek

    Li Zefan
     

02 Feb, 2010

1 commit

  • While looking for something else I noticed that the symbol
    hash function used by kconfig is quite poor. It doesn't
    use any of the standard hash techniques but simply
    adds up the string and then uses power of two masking,
    which is both known to perform poorly.

    The current x86 kconfig has over 7000 symbols.

    When I instrumented it showed that the minimum hash chain
    length was 16 and a significant number of them was over
    30.

    It didn't help that the hash table size was only 256 buckets.

    This patch increases the hash table size to a larger prime
    and switches to a FNV32 hash. I played around with a couple of hash
    functions, but that one seemed to perform best with reasonable
    hash table sizes.

    Increasing the hash table size even further didn't
    seem like a good idea, because there are a couple of global
    walks which walk the complete hash table.

    I also moved the unnamed bucket to 0. It's still the longest
    of all the buckets (44 entries), but hopefully it's not
    often hit except for the global walk which doesn't care.

    The result is a much nicer distribution:
    (first column bucket length, second number of buckets with that length)

    1: 3505
    2: 1236
    3: 294
    4: 52
    5: 3
    47: 1
    Signed-off-by: Michal Marek

    Andi Kleen
     

20 Sep, 2009

1 commit


29 Apr, 2008

2 commits

  • As choice dependency are now fully checked, it's quite easy to add support
    for named choices. This lifts the restriction that a choice value can only
    appear once, although it still has to be within the same group,
    but multiple choices can be joined by giving them a name.
    While at it I cleaned up a little the choice type logic to simplify it a
    bit.

    Signed-off-by: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Roman Zippel
     
  • Properly check the dependency of choices as a group.
    Also fix that sym_check_deps() correctly terminates the dependency loop
    error check (otherwise it would continue printing the dependency chain).

    Signed-off-by: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Roman Zippel
     

14 Feb, 2008

1 commit

  • > The attached .config (with current -git) results in a compile
    > error since it contains:
    >
    > CONFIG_X86=y
    > # CONFIG_EMBEDDED is not set
    > CONFIG_SERIO=m
    > CONFIG_SERIO_I8042=y
    >
    > Looking at drivers/input/serio/Kconfig I simply don't get how this
    > can happen.

    You've hit the rather subtle rules of select vs default. What happened is
    that SERIO is selected to m, but SERIO_I8042 isn't selected so the default
    of y is used instead.
    We already had the problem in the past that select and default don't work
    well together, so this patch cleans this up and makes the rule hopefully
    more straightforward. Basically now the value is calculated like this:

    (value && dependency) || select

    where the value is the user choice (if available and the symbol is
    visible) or default.

    In this case it means SERIO and SERIO_I8042 are both set to y due to their
    default and if SERIO didn't had the default, then the SERIO_I8042 value
    would be limited to m due to the dependency.

    I tested this patch with more 10000 random configs and above case is the
    only the difference that showed up, so I hope there is nothing that
    depended on the old more complex and subtle rules.

    Signed-off-by: Roman Zippel
    Tested-by: Adrian Bunk
    Signed-off-by: Sam Ravnborg

    Roman Zippel
     

29 Jan, 2008

4 commits


06 May, 2007

1 commit

  • Sample:
    config FOO
    bool "This is foo"
    depends on BAR

    config BAR
    bool "This is bar"
    depends on FOO

    This will result in following error message:
    error: found recursive dependency: FOO -> BAR -> FOO

    And will then exit with exit code equal 1 so make will stop.
    Inspired by patch from: Adrian Bunk

    Signed-off-by: Sam Ravnborg
    Cc: Adrian Bunk
    Cc: Roman Zippel

    Sam Ravnborg
     

14 Dec, 2006

1 commit

  • Those two functions are
    void sym_set_change_count(int count)
    and
    void sym_add_change_count(int count)

    All write accesses to sym_change_count are replaced by calls to above
    functions.

    Variable and changer-functions are moved to confdata.c. IMO thats ok, as
    sym_change_count is an attribute of the .config's change state.

    Signed-off-by: Karsten Wiese
    Cc: Sam Ravnborg
    Cc: Roman Zippel
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Karsten Wiese
     

09 Jun, 2006

4 commits


16 Jan, 2006

1 commit

  • To enable 'make kernelrelease' earlier now create .kernelrelease when
    one of the *config targets are used.
    Also introduce KERNELVERSION - only user is kconfig.
    KERNELVERSION was needed to display kernel version in menuconfig -
    KERNELRELEASE is not valid until configuration has completed.
    kconfig files modified to use KERNELVERSION.
    Bug reported by: Rene Rebe

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

09 Nov, 2005

3 commits

  • This allows variable arguments in the range option for int and hex config
    symbols.

    Signed-off-by: Roman Zippel
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • The restart check whether new symbols became visible, didn't always work for
    choice symbols. Even if a choice symbol itself isn't changable, the childs
    are. This also requires to update the new status of all choice values, once
    one of them is set.

    Signed-off-by: Roman Zippel
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • When doing its recursive dependency check, scripts/kconfig/conf uses the flag
    SYMBOL_CHECK_DONE to avoid rechecking a symbol it has already checked.
    However, that flag is only set at the top level, so if a symbol is first
    encountered as a dependency of another symbol it will be rechecked every time
    it is encountered until it's encountered at the top level.

    This patch adjusts the flag setting so that each symbol will only be checked
    once, regardless of whether it is first encountered at the top level, or while
    recursing down from another symbol. On complex configurations, this vastly
    speeds up scripts/kconfig/conf. The config in the powerpc merge tree is
    particularly bad: this patch reduces the time for 'scripts/kconfig/conf -o
    arch/powerpc/Kconfig' by a factor of 40 on a G5. That's even including the
    time to print the config, so the speedup in the actual checking is more likely
    2 or 3 orders of magnitude.

    Signed-off-by: David Gibson
    Signed-off-by: Roman Zippel
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds