Re: when CONFIG_PCI is not defined

From: Martin Mares (mj@suse.cz)
Date: Mon Jan 24 2000 - 14:29:33 EST


Hello,

> Well, if that is your and Linus' feeling, then you should rip out all
> the inlined compatibility code. As it stands now, there is a random
> collection of functions which work correctly for the !CONFIG_PCI case,
> and a random collection of functions which break if CONFIG_PCI is not
> defined. Bug city.

   Except for few rather esoteric things like searching for capabilities
or manual control of power management states, the whole old API works
in the !CONFIG_PCI case.

> I fully realize that inlined functions with the new API would create a
> SMALL bit of dead code. If you look at driver usage of the old APIs,
> this condition has existed for a long time. Dead code with !CONFIG_PCI
> was always a possibility.

   Well, if I look at usage of the API in the drivers, I immediately see
that almost all drivers using any PCI API are PCI-only drivers which
are not even compiled in if CONFIG_PCI is turned off. Hence the pci_*
stubs or ifdefs apply only to the few existing drivers which support
the same device on different busses.

   On the other hand, all functions would become dead, are marked as
either __devinit or __devexit, so that they will end up as init code
or even thrown away if the driver is compiled without CONFIG_HOTPLUG
(which is very likely in the !CONFIG_PCI case). So the code size increase
is probably harmless.

                                Have a nice fortnight

-- 
Martin `MJ' Mares <mj@ucw.cz> <mj@suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
"New PC concept: "plug and pray""

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:13 EST