1. 16 11月, 2016 1 次提交
    • N
      Kconfig: Introduce the "imply" keyword · 237e3ad0
      Nicolas Pitre 提交于
      The "imply" keyword is a weak version of "select" where the target
      config symbol can still be turned off, avoiding those pitfalls that come
      with the "select" keyword.
      
      This is useful e.g. with multiple drivers that want to indicate their
      ability to hook into a secondary subsystem while allowing the user to
      configure that subsystem out without also having to unset these drivers.
      
      Currently, the same effect can almost be achieved with:
      
      config DRIVER_A
      	tristate
      
      config DRIVER_B
      	tristate
      
      config DRIVER_C
      	tristate
      
      config DRIVER_D
      	tristate
      
      [...]
      
      config SUBSYSTEM_X
      	tristate
      	default DRIVER_A || DRIVER_B || DRIVER_C || DRIVER_D || [...]
      
      This is unwieldy to maintain especially with a large number of drivers.
      Furthermore, there is no easy way to restrict the choice for SUBSYSTEM_X
      to y or n, excluding m, when some drivers are built-in. The "select"
      keyword allows for excluding m, but it excludes n as well. Hence
      this "imply" keyword.  The above becomes:
      
      config DRIVER_A
      	tristate
      	imply SUBSYSTEM_X
      
      config DRIVER_B
      	tristate
      	imply SUBSYSTEM_X
      
      [...]
      
      config SUBSYSTEM_X
      	tristate
      
      This is much cleaner, and way more flexible than "select". SUBSYSTEM_X
      can still be configured out, and it can be set as a module when none of
      the drivers are configured in or all of them are modular.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NJohn Stultz <john.stultz@linaro.org>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Cc: Paul Bolle <pebolle@tiscali.nl>
      Cc: linux-kbuild@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Cc: Michal Marek <mmarek@suse.com>
      Cc: Edward Cree <ecree@solarflare.com>
      Link: http://lkml.kernel.org/r/1478841010-28605-2-git-send-email-nicolas.pitre@linaro.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      237e3ad0
  2. 05 1月, 2016 1 次提交
  3. 25 2月, 2015 1 次提交
  4. 28 11月, 2014 1 次提交
  5. 10 6月, 2014 1 次提交
  6. 08 4月, 2014 1 次提交
  7. 09 10月, 2013 3 次提交
  8. 05 9月, 2013 2 次提交
    • Y
      kconfig: do not allow more than one symbol to have 'option modules' · e0627813
      Yann E. MORIN 提交于
      Previously, it was possible to have more than one symbol with the
      'option modules' attached to them, although only the last one would
      in fact control tristates.
      
      Since this does not make much sense, only allow at most one symbol to
      control tristates.
      
      Note: it is still possible to have more than one symbol that control
      tristates, but indirectly:
      
          config MOD1
              bool "mod1"
              select MODULES
          config MOD2
              bool "mod2"
              select MODULES
          config MODULES
              bool
              option modules
      Signed-off-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      e0627813
    • Y
      kconfig: do not special-case 'MODULES' symbol · 6902dccf
      Yann E. MORIN 提交于
      Currently, the 'MODULES' symbol is hard-coded to be the default symbol
      that enables/disables tristates, if no other symbol was declared with
      'option modules'.
      
      While this used to be needed for the Linux kernel, we now have an
      explicit 'option modules' attached to the 'MODULES' symbol (since
      cset 11097a03), so we no longer need to special-case it in the
      kconfig code.
      
      Furthermore, kconfig is extensively used out of the Linux kernel, and
      other projects may have another meaning for a symbol named 'MODULES'.
      
      This patch changes the way we enable/disable tristates: if a symbol was
      found with 'option modules' attached to it, then that symbol controls
      enabling tristates. Otherwise, tristates are disabled, even if a symbol
      named 'MODULES' exists.
      Signed-off-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      6902dccf
  9. 19 6月, 2013 1 次提交
  10. 30 5月, 2013 1 次提交
    • D
      kconfig/menu.c: fix multiple references to expressions in menu_add_prop() · e983b7b1
      Dirk Gouders 提交于
      menu_add_prop() applies upper menus' visibilities to actual prompts
      by AND-ing the prompts visibilities with the upper menus ones.
      
      This creates a further reference to the menu's visibilities and when
      the expression reduction functions do their work, they may remove or
      modify expressions that have multiple references, thus causing
      unpredictable side-effects.
      
      The following example Kconfig constructs a case where this causes
      problems: a menu and a prompt which's visibilities depend on the same
      symbol.  When invoking mconf with this Kconfig and pressing "Z" we
      see a problem caused by a free'd expression still referenced by the
      menu's visibility:
      
      ------------------------------------------------------------------------
      mainmenu "Kconfig Testing Configuration"
      
      config VISIBLE
      	def_bool n
      
      config Placeholder
      	bool "Place holder"
      
      menu "Invisible"
      	visible if VISIBLE
      
      config TEST_VAR
      	bool "Test option" if VISIBLE
      
      endmenu
      ------------------------------------------------------------------------
      
      This patch fixes this problem by creating copies of the menu's
      visibility expressions before AND-ing them with the prompt's one.
      Signed-off-by: NDirk Gouders <dirk@gouders.net>
      [yann.morin.1998@free.fr: move variable into its block-scope,
                                keep lines <80 chars, typo]
      Tested-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
      Reviewed-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
      Signed-off-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
      e983b7b1
  11. 07 5月, 2013 1 次提交
  12. 01 5月, 2013 1 次提交
  13. 20 11月, 2012 1 次提交
  14. 25 10月, 2012 1 次提交
  15. 28 9月, 2012 2 次提交
  16. 08 8月, 2011 2 次提交
  17. 24 6月, 2011 1 次提交
  18. 07 6月, 2011 3 次提交
  19. 30 12月, 2010 1 次提交
  20. 16 12月, 2010 1 次提交
  21. 22 11月, 2010 1 次提交
  22. 04 10月, 2010 1 次提交
  23. 20 9月, 2010 3 次提交
  24. 03 8月, 2010 1 次提交
  25. 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
  26. 02 6月, 2010 3 次提交
    • L
      kconfig: fix to tag NEW symbols correctly · 3fb9acb3
      Li Zefan 提交于
      Those configs are not new:
      
        $ cat .config
        ...
        CONFIG_NAMESPACES=y
        ...
        CONFIG_BLOCK=y
        ...
      
      But are tagged as NEW:
      
        $ yes "" | make config > myconf
        $ cat myconf | grep '(NEW)'
        Namespaces support (NAMESPACES) [Y/?] (NEW) y
        ...
        Enable the block layer (BLOCK) [Y/?] (NEW) y
        ...
      
      You can also notice this bug when using gconfig/xconfig.
      
      It's because the SYMBOL_DEF_USER bit of an invisible symbol is cleared
      when the config file is read:
      
      int conf_read(const char *name)
      {
      	...
      	for_all_symbols(i, sym) {
      		if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
      			/* Reset values of generates values, so they'll appear
      			 * as new, if they should become visible, but that
      			 * doesn't quite work if the Kconfig and the saved
      			 * configuration disagree.
      			 */
      			if (sym->visible == no && !conf_unsaved)
      				sym->flags &= ~SYMBOL_DEF_USER;
      	...
      }
      
      But a menu item which represents an invisible symbol is still
      visible, if it's sub-menu is visible, so its SYMBOL_DEF_USER
      bit should be set to indicate it's not NEW.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      3fb9acb3
    • L
      kconfig: print the range of integer/hex symbol in help text · 70ed0747
      Li Zefan 提交于
      Without this patch, one has to refer to the Kconfig file to find
      out the range of an integer/hex symbol.
      
        │ Symbol: NR_CPUS [=4]
        │ Type  : integer
        │ Range : [2 8]
        │ Prompt: Maximum number of CPUs
        │   Defined at arch/x86/Kconfig:761
        │   Depends on: SMP [=y] && !MAXSMP [=n]
        │   Location:
        │     -> Processor type and features
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      70ed0747
    • L
      kconfig: print symbol type in help text · b040b44c
      Li Zefan 提交于
      Randy suggested to print out the symbol type in gconfig.
      
      Note this change does more than Randy's suggestion, that it also
      affects menuconfig and "make config".
      
        │ Symbol: BLOCK [=y]
        │ Type  : boolean
        │ Prompt: Enable the block layer
        │   Defined at block/Kconfig:4
        │   Depends on: EMBEDDED [=n]
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      b040b44c
  27. 14 4月, 2010 2 次提交
    • L
      menuconfig: add support to show hidden options which have prompts · 22c7eca6
      Li Zefan 提交于
      Usage:
        Press <Z> to show all config symbols which have prompts.
      
      Quote Tim Bird:
      
      | I've been bitten by this numerous times.  I most often
      | use ftrace on ARM, but when I go back to x86, I almost
      | always go through a sequence of searching for the
      | function graph tracer in the menus, then realizing it's
      | completely missing until I disable CC_OPTIMIZE_FOR_SIZE.
      |
      | Is there any way to have the menu item appear, but be
      | unsettable unless the SIZE option is disabled?  I'm
      | not a Kconfig guru...
      
      I myself found this useful too. For example, I need to test
      ftrace/tracing and want to be sure all the tracing features are
      enabled, so I  enter the "Tracers" menu, and press <Z> to
      see if there is any config hidden.
      
      I also noticed gconfig and xconfig have a button "Show all options",
      but that's a bit too much, and I think normally what we are not
      interested in those configs which have no prompt thus can't be
      changed by users.
      
      Exmaple:
      
            --- Tracers
            -*-   Kernel Function Tracer
            - -     Kernel Function Graph Tracer
            [*]   Interrupts-off Latency Tracer
            - -   Preemption-off Latency Tracer
            [*]   Sysprof Tracer
      
      Here you can see 2 tracers are not selectable, and then can find
      out how to make them selectable.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      22c7eca6
    • L
      kconfig: some small fixes · 4280eae0
      Li Zefan 提交于
      - fix a typo in documentation
      - fix a typo in a printk on error
      - fix comments in dialog_inputbox()
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      4280eae0
  28. 02 2月, 2010 1 次提交