[PATCH] build without PCI or VIO

Olof Johansson olof at austin.ibm.com
Fri Feb 11 15:14:05 EST 2005


On Fri, Feb 11, 2005 at 12:24:07AM +1100, Stephen Rothwell wrote:

> I agree entirely and was thinking that as I posted the patch.  I have used
> CONFIG_PPC_IOMMU in the new version.

Great. :)

> > * 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?
> 
> OK, read the new patch, I have left most of the code alone now as you
> suggested.

I like this patch alot more. dma.c is still filled with ifdefs, but it
already has them for CONFIG_IBMVIO and it doesn't really contain any
"real" code anyway, just wrappers. 

The benefit is the same, but the cost (in lost readability and
maintainability) is considerably less. I'm happy with it.

One minor CodingStyle nitpick:

@@ -42,7 +47,11 @@
 void pci_addr_cache_remove_device(struct pci_dev *dev);

 /* From pSeries_pci.h */
-void init_pci_config_tokens (void);
+#ifdef CONFIG_PCI
+extern void init_pci_config_tokens (void);
+#else
+static inline void init_pci_config_tokens (void) { }
+#endif
 unsigned long get_phb_buid (struct device_node *);

Whitespace after function names above, might as well fix it on the lines
you change...


Besides that, for what it's worth:

Acked-by: Olof Johansson <olof at austin.ibm.com>


-Olof



More information about the Linuxppc64-dev mailing list