"Chris Bednar wrote:"
>    Sorry for the repeat...  I submitted this a couple
> of days ago, but I probably should have targetted a
> couple of people, so I'll do that now.
> 
> The point is that there's some pollution in arch/ppc/config.in
> that doesn't allow a G4 user (for example) to configure a
> host of PCI devices. The problem is that both branches of a
> conditional are evaluated, so only the second ever matters.
> The thing looks perfectly valid to a shell-script writer's eye,
> but it doesn't work here.

This is a xconfig feature. xconfig stores values for dependancy disabled
variables changing the variable values (they are not equal to "n" neither
undefined). That way the following (otherwise config-langauage.txt
compliant) cases do not work:

- when the same config variable is used in different active instructions
  (bool, tristate, dep_*, etc), even if they depend on contradictional
  conditions), eg:

- when define_* instruction is located *before* an active instruction using
  the same variable (your example).

Fixing xconfig in both cases would need its total rewrite so, IMHO, it is not
worth to do it. I see two solutions of this problem:

1. reverse the condition (simpler, but with a side effect):
  if [ "$CONFIG_6xx" != "y" -a "$CONFIG_PPC64BRIDGE" != "y" ]; then
     bool 'QSpan PCI' CONFIG_PCI
  else
     define_bool CONFIG_PCI y
  fi

2. use other temporary config variables to handle this case (more
   complicated, but working better):
  unset CONFIG_PCI_6XX
  ...
  if [ "$CONFIG_6xx" = "y" -o "$CONFIG_PPC64BRIDGE" = "y" ]; then
     define_bool CONFIG_PCI_6XX y
  else
  # CONFIG_8xx
     bool 'QSpan PCI' CONFIG_PCI_8XX
  fi
  ...  
  if [ "$CONFIG_PCI_6XX" = "y" -o "$CONFIG_PCI_8XX" = "y" ]; then
    define_bool CONFIG_PCI y
  else
    define_bool CONFIG_PCI n
  fi

> On Sun, 10 Sep 2000, Chris Bednar wrote:
> >    The following is a little patch I've been having to
> > do to get development kernels to configure PCI right on
> > my G4. I know it's not the right thing to do, but I've
> > never managed to figure out what's wrong with the original;
> > maybe somebody who understands config-speak will know.
> > 
> >    Anyway, without this trick, I can't configure
> > tulip ethernet, firewire, etc, so I'm still wondering
> > if it's just all a big mistake on my part - surely
> > someone else should have hit this problem...
> > 
> > --------------------------------------------------------
> > 
> > --- linux-2.4.0-test8-pmac/arch/ppc/config.in-pciconf-prepatch      Mon Aug 28 
>18:56:02 2000
> > +++ linux-2.4.0-test8-pmac/arch/ppc/config.in       Sat Sep  9 11:16:38 2000
> > @@ -106,9 +106,9 @@
> >  else
> >     if [ "$CONFIG_6xx" = "y" -o "$CONFIG_PPC64BRIDGE" = "y" ]; then
> >        define_bool CONFIG_PCI y
> > -   else
> > -   # CONFIG_8xx
> > -      bool 'QSpan PCI' CONFIG_PCI
> > +# -?huh?-   else
> > +# -?huh?-   # CONFIG_8xx
> > +# -?huh?-      bool 'QSpan PCI' CONFIG_PCI
> >     fi
> >  fi

--
=======================================================================
  Andrzej M. Krzysztofowicz               [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to