On Sun, 23 May 2010, Simon Kitching wrote: > On Sun, 2010-05-23 at 05:21 -0400, Robert P. J. Day wrote: > > On Sun, 23 May 2010, Simon Kitching wrote: > > > > > I see that drivers/vhost/Kconfig contains this: > > > > > > config VHOST_NET > > > tristate "Host kernel accelerator for virtio net (EXPERIMENTAL)" > > > depends on NET && EVENTFD && (TUN || !TUN) && (MACVTAP || !MACVTAP) > > > && EXPERIMENTAL > > > > > > I'm not very familiar with Kconfig, but that does look rather weird > > > to me: (TUN || !TUN) ??. It might be worth reading the appropriate > > > emailing list archives (search file MAINTAINERS for "vhost"). > > > > as a ***guess***, i'm going to suggest that that means that it's > > either selected for compilation into the kernel, or not selected at > > all -- as in, not TUN=m. but that's just a guess. > > Yes, that could be a good guess. > > After reading your suggestion, I looked again and found this in > drivers/gpu/drm/Kconfig: > depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU > > Presumably AGP is equivalent to (AGP==y), and !AGP is equivalent to > (AGP=n). So this is the same (a || !a) pattern as used in VHOST_NET, > which suggests this is indeed deliberate. > > Quite why drm would insist on its dependency not being a loadable module > I don't know. Module-loading should be up and running before X starts. > Any ideas? > > And drivers/media/Kconfig has: > depends on (I2C || I2C=n) && VIDEO_DEV > > Maybe the VHOST_NET setting is trying to block TUN-as-a-module because > vhost_net can be used really early in boot of the guest? Whatever this > is doing, it might be nice to get some comments in the Kconfig > explaining this... the technical description of how all this works in is the file Documentation/kbuild/kconfig-language.txt: Menu dependencies ----------------- Dependencies define the visibility of a menu entry and can also reduce the input range of tristate symbols. The tristate logic used in the expressions uses one more state than normal boolean logic to express the module state. Dependency expressions have the following syntax: <expr> ::= <symbol> (1) <symbol> '=' <symbol> (2) <symbol> '!=' <symbol> (3) '(' <expr> ')' (4) '!' <expr> (5) <expr> '&&' <expr> (6) <expr> '||' <expr> (7) Expressions are listed in decreasing order of precedence. (1) Convert the symbol into an expression. Boolean and tristate symbols are simply converted into the respective expression values. All other symbol types result in 'n'. (2) If the values of both symbols are equal, it returns 'y', otherwise 'n'. (3) If the values of both symbols are equal, it returns 'n', otherwise 'y'. (4) Returns the value of the expression. Used to override precedence. (5) Returns the result of (2-/expr/). (6) Returns the result of min(/expr/, /expr/). (7) Returns the result of max(/expr/, /expr/). An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2 respectively for calculations). A menu entry becomes visible when its expression evaluates to 'm' or 'y'. once upon a time, i understood all that. :-) rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ