[PATCH] build without PCI or VIO

Olof Johansson olof at austin.ibm.com
Thu Feb 10 17:39:42 EST 2005


On Wed, Feb 09, 2005 at 06:34:37PM +1100, Stephen Rothwell wrote:
> Hi Anton, all,
> 
> This patch (on top of my previous dma fix up patch) allows you to build
> pSeries without CONFIG_PCI or CONFIG_VIO or both and iSeries without PCI. 
> Don't look to closely at the include/asm-ppc64/floppy.h patch :-).
> 
> Built on pSeries without PCI and VIO (and both).  Built and booted in
> iSeries without PCI.
> 
> Please comment.

I'm not sure just what to think about this patch. :-) It's neat to be
able to boot pSeries without PCI configured, but how much does it really
buy us?

Building a pSeries allnoconfig + setting EMBEDDED=y and disabling
PCI, v.s.  allnoconfig + setting EMBEDDED=y and keeping PCI enabled
(but all else is disabled) gives:

-rwxr-xr-x 1 olof   olof    1963982 2005-02-09 23:56 vmlinux.nopci
-rwxr-xr-x 1 olof   olof    2099167 2005-02-09 23:58 vmlinux

6.8% difference for a kernel completely without drivers.

-rwxr-xr-x 1 olof  olof    2127661 2005-02-10 00:35 vmlinux.vio-and-pci
-rwxr-xr-x 1 olof  olof    2011044 2005-02-10 00:33 vmlinux.vio-no-pci

5.7% on vio (with hvc only) vs vio (with hvc only) + pci

Does the amount of added #ifdefs to C code justify the savings? How
common do we think it will be to run completely without PCI, and how
critical will it be to save those bytes of memory? I guess fully virtual
partitions are the most likely user, i.e. with CONFIG_VIO but without
CONFIG_PCI.


Anyway, if people feel it's worth merging, here are some general comments:

* CONFIG_IBMIOMMU is somewhat misleading. We have IOMMU's on other
  hardware than those with IBM badges, albeit we don't support hotplug
  on them. I guess the IBM part might come from the fact that we call it
  CONFIG_IBMVIO. :)
  --> Is CONFIG_IOMMU too generic to use instead? It's not used anywhere
      else yet.

* I'm worried about the amount of new #ifdefs, for two reasons. First is
  readability, second is risk of breaking non-PCI config with new
  changes.
  --> Maybe defining empty inline stubs but still call them is more
      appropriate for the symbols that need to be considered? How is
      this handled on other architectures?

* If you want to go the whole way, then there's more to do to save
  space. For example, the iommu_table pointer in struct device_node
  and some of the ppc_md pointers. They'd be removable only if both PCI
  and VIO is disabled which I find highly unlikely in most production
  configs. :-)


-Olof



More information about the Linuxppc64-dev mailing list