1. 03 8月, 2010 2 次提交
    • R
      kconfig: print more info when we see a recursive dependency · d595cea6
      Roman Zippel 提交于
      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: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      d595cea6
    • S
      kconfig: save location of config symbols · 59e89e3d
      Sam Ravnborg 提交于
      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: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      59e89e3d
  2. 08 7月, 2010 1 次提交
  3. 02 7月, 2010 1 次提交
    • C
      kbuild: Warn on selecting symbols with unmet direct dependencies · 246cf9c2
      Catalin Marinas 提交于
      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: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      246cf9c2
  4. 23 3月, 2010 1 次提交
    • L
      kconfig: recalc symbol value before showing search results · da6df879
      Li Zefan 提交于
      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: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      da6df879
  5. 02 2月, 2010 1 次提交
    • A
      Improve kconfig symbol hashing · e66f25d7
      Andi Kleen 提交于
      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		<--- this is the unnamed symbols bucket
      
      There are still some 5+ buckets, but increasing the hash table
      even more would be likely not worth it.
      
      This also cleans up the code slightly by removing hard coded
      magic numbers.
      
      I didn't notice a big performance difference either way
      on my Nehalem system, but I presume it'll help somewhat
      on slower systems.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      e66f25d7
  6. 20 9月, 2009 1 次提交
  7. 29 4月, 2008 2 次提交
  8. 14 2月, 2008 1 次提交
    • R
      kconfig: fix select in combination with default · 587c9061
      Roman Zippel 提交于
      > 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: NRoman Zippel <zippel@linux-m68k.org>
      Tested-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      587c9061
  9. 29 1月, 2008 4 次提交
  10. 06 5月, 2007 1 次提交
    • S
      kconfig: error out if recursive dependencies are found · 5447d34b
      Sam Ravnborg 提交于
      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 <bunk@stusta.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Adrian Bunk <bunk@stusta.de>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      5447d34b
  11. 14 12月, 2006 1 次提交
  12. 09 6月, 2006 4 次提交
  13. 16 1月, 2006 1 次提交
    • S
      kbuild: create .kernelrelease at *config step · 2244cbd8
      Sam Ravnborg 提交于
      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 <rene@exactcode.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      2244cbd8
  14. 09 11月, 2005 3 次提交
  15. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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!
      1da177e4