[PATCH] build without PCI or VIO

Stephen Rothwell sfr at canb.auug.org.au
Wed Feb 9 18:34:37 EST 2005


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.

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN linus-bk-dma.4/arch/ppc64/Kconfig linus-bk-dma.5/arch/ppc64/Kconfig
--- linus-bk-dma.4/arch/ppc64/Kconfig	2005-01-29 06:05:47.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/Kconfig	2005-02-09 18:11:46.000000000 +1100
@@ -126,6 +126,11 @@
 
 config IBMVIO
 	depends on PPC_PSERIES || PPC_ISERIES
+	bool "Support for virtual I/O" if (EMBEDDED && PPC_PSERIES)
+	default y
+
+config IBMIOMMU
+	depends on IBMVIO || PCI
 	bool
 	default y
 
@@ -236,7 +241,7 @@
 
 config EEH
 	bool "PCI Extended Error Handling (EEH)" if EMBEDDED
-	depends on PPC_PSERIES
+	depends on PPC_PSERIES && PCI
 	default y if !EMBEDDED
 
 #
@@ -295,7 +300,7 @@
 	bool
 
 config PCI
-	bool
+	bool "support for PCI devices" if (EMBEDDED && (PPC_PSERIES || PPC_ISERIES))
 	default y
 	help
 	  Find out whether your system includes a PCI bus. PCI is the name of
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/Makefile linus-bk-dma.5/arch/ppc64/kernel/Makefile
--- linus-bk-dma.4/arch/ppc64/kernel/Makefile	2005-01-29 06:05:47.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/Makefile	2005-02-09 18:12:41.000000000 +1100
@@ -11,27 +11,32 @@
 			udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \
 			ptrace32.o signal32.o rtc.o init_task.o \
 			lmb.o cputable.o cpu_setup_power4.o idle_power4.o \
-			iommu.o sysfs.o
+			sysfs.o
 
 obj-$(CONFIG_PPC_OF) +=	of_device.o
 
-pci-obj-$(CONFIG_PPC_ISERIES)	+= iSeries_pci.o iSeries_pci_reset.o
+pci-obj-$(CONFIG_PPC_PSERIES)	+= pSeries_pci.o
+pci-obj-$(CONFIG_PPC_ISERIES)	+= iSeries_pci.o iSeries_pci_reset.o \
+					XmPciLpEvent.o
 pci-obj-$(CONFIG_PPC_MULTIPLATFORM)	+= pci_dn.o pci_direct_iommu.o
 
 obj-$(CONFIG_PCI)	+= pci.o pci_iommu.o iomap.o $(pci-obj-y)
 
-obj-$(CONFIG_PPC_ISERIES) += iSeries_irq.o \
-			     iSeries_VpdInfo.o XmPciLpEvent.o \
+iommu-obj-$(CONFIG_PPC_PSERIES) += pSeries_iommu.o
+iommu-obj-$(CONFIG_PPC_ISERIES) += iSeries_iommu.o
+
+obj-$(CONFIG_IBMIOMMU) += iommu.o $(iommu-obj-y)
+
+obj-$(CONFIG_PPC_ISERIES) += iSeries_irq.o iSeries_VpdInfo.o \
 			     HvCall.o HvLpConfig.o LparData.o \
 			     iSeries_setup.o ItLpQueue.o hvCall.o \
-			     mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \
-			     iSeries_iommu.o
+			     mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o
 
 obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o prom.o mpic.o
 
-obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \
+obj-$(CONFIG_PPC_PSERIES) += pSeries_lpar.o pSeries_hvCall.o \
 			     pSeries_nvram.o rtasd.o ras.o \
-			     xics.o rtas.o pSeries_setup.o pSeries_iommu.o
+			     xics.o rtas.o pSeries_setup.o
 
 obj-$(CONFIG_EEH)		+= eeh.o
 obj-$(CONFIG_PROC_FS)		+= proc_ppc64.o
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/dma.c linus-bk-dma.5/arch/ppc64/kernel/dma.c
--- linus-bk-dma.4/arch/ppc64/kernel/dma.c	2005-02-07 17:47:41.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/dma.c	2005-02-08 17:10:00.000000000 +1100
@@ -15,8 +15,10 @@
 
 static struct dma_mapping_ops *get_dma_ops(struct device *dev)
 {
+#ifdef CONFIG_PCI
 	if (dev->bus == &pci_bus_type)
 		return &pci_dma_ops;
+#endif
 #ifdef CONFIG_IBMVIO
 	if (dev->bus == &vio_bus_type)
 		return &vio_dma_ops;
@@ -37,8 +39,10 @@
 
 int dma_set_mask(struct device *dev, u64 dma_mask)
 {
+#ifdef CONFIG_PCI
 	if (dev->bus == &pci_bus_type)
 		return pci_set_dma_mask(to_pci_dev(dev), dma_mask);
+#endif
 #ifdef CONFIG_IBMVIO
 	if (dev->bus == &vio_bus_type)
 		return -EIO;
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/iSeries_iommu.c linus-bk-dma.5/arch/ppc64/kernel/iSeries_iommu.c
--- linus-bk-dma.4/arch/ppc64/kernel/iSeries_iommu.c	2005-01-09 10:05:39.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/iSeries_iommu.c	2005-02-09 18:16:16.000000000 +1100
@@ -34,7 +34,9 @@
 #include <asm/iSeries/HvCallXm.h>
 #include <asm/iSeries/iSeries_pci.h>
 
+#ifdef CONFIG_PCI
 extern struct list_head iSeries_Global_Device_List;
+#endif
 
 
 static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages,
@@ -84,6 +86,7 @@
 }
 
 
+#ifdef CONFIG_PCI
 /*
  * This function compares the known tables to find an iommu_table
  * that has already been built for hardware TCEs.
@@ -162,14 +165,17 @@
 
 static void iommu_dev_setup_iSeries(struct pci_dev *dev) { }
 static void iommu_bus_setup_iSeries(struct pci_bus *bus) { }
+#endif
 
 void iommu_init_early_iSeries(void)
 {
 	ppc_md.tce_build = tce_build_iSeries;
 	ppc_md.tce_free  = tce_free_iSeries;
 
+#ifdef CONFIG_PCI
 	ppc_md.iommu_dev_setup = iommu_dev_setup_iSeries;
 	ppc_md.iommu_bus_setup = iommu_bus_setup_iSeries;
 
 	pci_iommu_init();
+#endif
 }
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/iSeries_irq.c linus-bk-dma.5/arch/ppc64/kernel/iSeries_irq.c
--- linus-bk-dma.4/arch/ppc64/kernel/iSeries_irq.c	2004-10-30 08:33:22.000000000 +1000
+++ linus-bk-dma.5/arch/ppc64/kernel/iSeries_irq.c	2005-02-08 17:36:06.000000000 +1100
@@ -65,8 +65,10 @@
 /* This is called by init_IRQ.  set in ppc_md.init_IRQ by iSeries_setup.c */
 void __init iSeries_init_IRQ(void)
 {
+#ifdef CONFIG_PCI
 	/* Register PCI event handler and open an event path */
 	XmPciLpEvent_init();
+#endif
 }
 
 /*
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/iSeries_setup.c linus-bk-dma.5/arch/ppc64/kernel/iSeries_setup.c
--- linus-bk-dma.4/arch/ppc64/kernel/iSeries_setup.c	2005-01-09 10:05:39.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/iSeries_setup.c	2005-02-09 17:22:15.000000000 +1100
@@ -45,7 +45,7 @@
 #include <asm/naca.h>
 #include <asm/paca.h>
 #include <asm/cache.h>
-#include <asm/sections.h>
+#include <asm/iommu.h>
 #include <asm/iSeries/LparData.h>
 #include <asm/iSeries/HvCallHpt.h>
 #include <asm/iSeries/HvLpConfig.h>
@@ -844,7 +844,9 @@
 	ppc_md.get_irq = iSeries_get_irq;
 	ppc_md.init_early = iSeries_init_early,
 
+#ifdef CONFIG_PCI
 	ppc_md.pcibios_fixup  = iSeries_pci_final_fixup;
+#endif
 
 	ppc_md.restart = iSeries_restart;
 	ppc_md.power_off = iSeries_power_off;
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/pSeries_iommu.c linus-bk-dma.5/arch/ppc64/kernel/pSeries_iommu.c
--- linus-bk-dma.4/arch/ppc64/kernel/pSeries_iommu.c	2005-02-04 04:10:36.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/pSeries_iommu.c	2005-02-09 13:29:02.000000000 +1100
@@ -236,6 +236,7 @@
 	}
 }
 
+#ifdef CONFIG_PCI
 static void iommu_table_setparms(struct pci_controller *phb,
 				 struct device_node *dn,
 				 struct iommu_table *tbl) 
@@ -457,10 +458,12 @@
 
 static void iommu_bus_setup_null(struct pci_bus *b) { }
 static void iommu_dev_setup_null(struct pci_dev *d) { }
+#endif
 
 /* These are called very early. */
 void iommu_init_early_pSeries(void)
 {
+#ifdef CONFIG_PCI
 	if (of_chosen && get_property(of_chosen, "linux,iommu-off", NULL)) {
 		/* Direct I/O, IOMMU off */
 		ppc_md.iommu_dev_setup = iommu_dev_setup_null;
@@ -469,6 +472,7 @@
 
 		return;
 	}
+#endif
 
 	if (systemcfg->platform & PLATFORM_LPAR) {
 		if (cur_cpu_spec->firmware_features & FW_FEATURE_MULTITCE) {
@@ -478,15 +482,21 @@
 			ppc_md.tce_build = tce_build_pSeriesLP;
 			ppc_md.tce_free	 = tce_free_pSeriesLP;
 		}
+#ifdef CONFIG_PCI
 		ppc_md.iommu_bus_setup = iommu_bus_setup_pSeriesLP;
+#endif
 	} else {
 		ppc_md.tce_build = tce_build_pSeries;
 		ppc_md.tce_free  = tce_free_pSeries;
+#ifdef CONFIG_PCI
 		ppc_md.iommu_bus_setup = iommu_bus_setup_pSeries;
+#endif
 	}
 
+#ifdef CONFIG_PCI
 	ppc_md.iommu_dev_setup = iommu_dev_setup_pSeries;
 
 	pci_iommu_init();
+#endif
 }
 
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/pSeries_setup.c linus-bk-dma.5/arch/ppc64/kernel/pSeries_setup.c
--- linus-bk-dma.4/arch/ppc64/kernel/pSeries_setup.c	2005-01-29 06:05:47.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/pSeries_setup.c	2005-02-09 13:32:29.000000000 +1100
@@ -222,10 +222,12 @@
 
 	fwnmi_init();
 
+#ifdef CONFIG_PCI
 	/* Find and initialize PCI host bridges */
 	init_pci_config_tokens();
 	eeh_init();
 	find_and_init_phbs();
+#endif
 
 #ifdef CONFIG_DUMMY_CONSOLE
 	conswitchp = &dummy_con;
@@ -594,7 +596,9 @@
 	.init_early		= pSeries_init_early,
 	.get_cpuinfo		= pSeries_get_cpuinfo,
 	.log_error		= pSeries_log_error,
+#ifdef CONFIG_PCI
 	.pcibios_fixup		= pSeries_final_fixup,
+#endif
 	.restart		= rtas_restart,
 	.power_off		= rtas_power_off,
 	.halt			= rtas_halt,
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/pci.c linus-bk-dma.5/arch/ppc64/kernel/pci.c
--- linus-bk-dma.4/arch/ppc64/kernel/pci.c	2005-02-07 14:45:23.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/pci.c	2005-02-09 16:19:48.000000000 +1100
@@ -63,7 +63,9 @@
  * page is mapped and isa_io_limit prevents access to it.
  */
 unsigned long isa_io_base;	/* NULL if no ISA bus */
+EXPORT_SYMBOL(isa_io_base);
 unsigned long pci_io_base;
+EXPORT_SYMBOL(pci_io_base);
 
 void iSeries_pcibios_init(void);
 
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/ppc_ksyms.c linus-bk-dma.5/arch/ppc64/kernel/ppc_ksyms.c
--- linus-bk-dma.4/arch/ppc64/kernel/ppc_ksyms.c	2005-01-12 16:05:22.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/ppc_ksyms.c	2005-02-09 16:20:07.000000000 +1100
@@ -49,9 +49,6 @@
 
 EXPORT_SYMBOL(do_signal);
 
-EXPORT_SYMBOL(isa_io_base);
-EXPORT_SYMBOL(pci_io_base);
-
 EXPORT_SYMBOL(strcpy);
 EXPORT_SYMBOL(strncpy);
 EXPORT_SYMBOL(strcat);
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/prom.c linus-bk-dma.5/arch/ppc64/kernel/prom.c
--- linus-bk-dma.4/arch/ppc64/kernel/prom.c	2005-01-29 06:05:47.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/prom.c	2005-02-09 17:09:52.000000000 +1100
@@ -1802,8 +1802,10 @@
  */
 static void of_cleanup_node(struct device_node *np)
 {
+#ifdef CONFIG_IBMIOMMU
 	if (np->iommu_table && get_property(np, "ibm,dma-window", NULL))
 		iommu_free_table(np);
+#endif
 }
 
 /*
diff -ruN linus-bk-dma.4/arch/ppc64/kernel/sys_ppc32.c linus-bk-dma.5/arch/ppc64/kernel/sys_ppc32.c
--- linus-bk-dma.4/arch/ppc64/kernel/sys_ppc32.c	2005-01-29 06:05:47.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/kernel/sys_ppc32.c	2005-02-08 17:26:43.000000000 +1100
@@ -741,6 +741,7 @@
 
 asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn)
 {
+#ifdef CONFIG_PCI
 	struct pci_controller* hose;
 	struct list_head *ln;
 	struct pci_bus *bus = NULL;
@@ -786,7 +787,7 @@
 	case IOBASE_ISA_MEM:
 		return -EINVAL;
 	}
-
+#endif
 	return -EOPNOTSUPP;
 }
 
diff -ruN linus-bk-dma.4/arch/ppc64/lib/Makefile linus-bk-dma.5/arch/ppc64/lib/Makefile
--- linus-bk-dma.4/arch/ppc64/lib/Makefile	2005-01-04 17:05:28.000000000 +1100
+++ linus-bk-dma.5/arch/ppc64/lib/Makefile	2005-02-08 17:34:53.000000000 +1100
@@ -12,7 +12,7 @@
 
 # e2a provides EBCDIC to ASCII conversions.
 ifdef CONFIG_PPC_ISERIES
-obj-$(CONFIG_PCI)	+= e2a.o
+obj-y	+= e2a.o
 endif
 
 lib-$(CONFIG_DEBUG_KERNEL) += sstep.o
diff -ruN linus-bk-dma.4/drivers/char/Kconfig linus-bk-dma.5/drivers/char/Kconfig
--- linus-bk-dma.4/drivers/char/Kconfig	2005-02-04 04:10:36.000000000 +1100
+++ linus-bk-dma.5/drivers/char/Kconfig	2005-02-09 16:33:37.000000000 +1100
@@ -557,7 +557,7 @@
 
 config HVC_CONSOLE
 	bool "pSeries Hypervisor Virtual Console support"
-	depends on PPC_PSERIES
+	depends on PPC_PSERIES && IBMVIO
 	help
 	  pSeries machines when partitioned support a hypervisor virtual
 	  console. This driver allows each pSeries partition to have a console
@@ -565,7 +565,7 @@
 
 config HVCS
 	tristate "IBM Hypervisor Virtual Console Server support"
-	depends on PPC_PSERIES
+	depends on PPC_PSERIES && IBMVIO
 	help
 	  Partitionable IBM Power5 ppc64 machines allow hosting of
 	  firmware virtual consoles from one Linux partition by
diff -ruN linus-bk-dma.4/drivers/net/Kconfig linus-bk-dma.5/drivers/net/Kconfig
--- linus-bk-dma.4/drivers/net/Kconfig	2005-01-20 07:06:57.000000000 +1100
+++ linus-bk-dma.5/drivers/net/Kconfig	2005-02-09 18:26:34.000000000 +1100
@@ -1171,7 +1171,7 @@
 
 config IBMVETH
 	tristate "IBM LAN Virtual Ethernet support"
-	depends on NETDEVICES && NET_ETHERNET && PPC_PSERIES
+	depends on NETDEVICES && NET_ETHERNET && PPC_PSERIES && IBMVIO
 	---help---
 	  This driver supports virtual ethernet adapters on newer IBM iSeries
 	  and pSeries systems.
diff -ruN linus-bk-dma.4/drivers/pci/hotplug/Makefile linus-bk-dma.5/drivers/pci/hotplug/Makefile
--- linus-bk-dma.4/drivers/pci/hotplug/Makefile	2004-11-20 12:05:26.000000000 +1100
+++ linus-bk-dma.5/drivers/pci/hotplug/Makefile	2005-02-09 16:46:14.000000000 +1100
@@ -42,8 +42,10 @@
 
 rpaphp-objs		:=	rpaphp_core.o	\
 				rpaphp_pci.o	\
-				rpaphp_slot.o	\
-				rpaphp_vio.o
+				rpaphp_slot.o
+ifdef CONFIG_IBMVIO
+rpaphp-objs		+=	rpaphp_vio.o
+endif
 
 rpadlpar_io-objs	:=	rpadlpar_core.o \
 				rpadlpar_sysfs.o
diff -ruN linus-bk-dma.4/drivers/pci/hotplug/rpaphp_core.c linus-bk-dma.5/drivers/pci/hotplug/rpaphp_core.c
--- linus-bk-dma.4/drivers/pci/hotplug/rpaphp_core.c	2005-02-04 06:05:19.000000000 +1100
+++ linus-bk-dma.5/drivers/pci/hotplug/rpaphp_core.c	2005-02-09 16:52:25.000000000 +1100
@@ -157,9 +157,11 @@
 	case PCI_DEV:
 		retval = rpaphp_get_pci_adapter_status(slot, 0, value);
 		break;
+#ifdef CONFIG_IBMVIO
 	case VIO_DEV:
 		retval = rpaphp_get_vio_adapter_status(slot, 0, value);
 		break;
+#endif
 	default:
 		retval = -EINVAL;
 	}
@@ -363,8 +365,10 @@
 	dbg("Entry %s: dn->full_name=%s\n", __FUNCTION__, dn->full_name);
 
 	if (dn->parent && is_vdevice_root(dn->parent)) {
+#ifdef CONFIG_IBMVIO
 		/* register a VIO device */
 		retval = register_vio_slot(dn);
+#endif
 		goto exit;
 	}
 
@@ -485,9 +489,11 @@
 	case PCI_DEV:
 		retval = rpaphp_enable_pci_slot(slot);
 		break;
+#ifdef CONFIG_IBMVIO
 	case VIO_DEV:
 		retval = rpaphp_enable_vio_slot(slot);
 		break;
+#endif
 	default:
 		retval = -EINVAL;
 	}
@@ -515,9 +521,11 @@
 	case PCI_DEV:
 		retval = rpaphp_unconfig_pci_adapter(slot);
 		break;
+#ifdef CONFIG_IBMVIO
 	case VIO_DEV:
 		retval = rpaphp_unconfig_vio_adapter(slot);
 		break;
+#endif
 	default:
 		retval = -ENODEV;
 	}
diff -ruN linus-bk-dma.4/drivers/scsi/Kconfig linus-bk-dma.5/drivers/scsi/Kconfig
--- linus-bk-dma.4/drivers/scsi/Kconfig	2005-01-29 06:05:47.000000000 +1100
+++ linus-bk-dma.5/drivers/scsi/Kconfig	2005-02-09 16:31:46.000000000 +1100
@@ -798,7 +798,7 @@
 
 config SCSI_IBMVSCSI
 	tristate "IBM Virtual SCSI support"
-	depends on PPC_PSERIES || PPC_ISERIES
+	depends on (PPC_PSERIES || PPC_ISERIES) && IBMVIO
 	help
 	  This is the IBM POWER Virtual SCSI Client
 
diff -ruN linus-bk-dma.4/drivers/serial/Kconfig linus-bk-dma.5/drivers/serial/Kconfig
--- linus-bk-dma.4/drivers/serial/Kconfig	2005-02-04 04:10:37.000000000 +1100
+++ linus-bk-dma.5/drivers/serial/Kconfig	2005-02-08 17:57:30.000000000 +1100
@@ -753,7 +753,7 @@
 
 config SERIAL_ICOM
 	tristate "IBM Multiport Serial Adapter"
-	depends on PPC_ISERIES || PPC_PSERIES
+	depends on PCI && (PPC_ISERIES || PPC_PSERIES)
 	select SERIAL_CORE
 	help
 	  This driver is for a family of multiport serial adapters
diff -ruN linus-bk-dma.4/include/asm-ppc64/floppy.h linus-bk-dma.5/include/asm-ppc64/floppy.h
--- linus-bk-dma.4/include/asm-ppc64/floppy.h	2004-10-25 18:18:34.000000000 +1000
+++ linus-bk-dma.5/include/asm-ppc64/floppy.h	2005-02-09 13:56:34.000000000 +1100
@@ -31,8 +31,6 @@
 				            "floppy", NULL)
 #define fd_free_irq()           free_irq(FLOPPY_IRQ, NULL);
 
-#ifdef CONFIG_PCI
-
 #include <linux/pci.h>
 
 #define fd_dma_setup(addr,size,mode,io) ppc64_fd_dma_setup(addr,size,mode,io)
@@ -40,6 +38,7 @@
 static __inline__ int 
 ppc64_fd_dma_setup(char *addr, unsigned long size, int mode, int io)
 {
+#ifdef CONFIG_PCI
 	static unsigned long prev_size;
 	static dma_addr_t bus_addr = 0;
 	static char *prev_addr;
@@ -71,11 +70,11 @@
 	fd_set_dma_count(size);
 	virtual_dma_port = io;
 	fd_enable_dma();
+#endif /* CONFIG_PCI */
 
 	return 0;
 }
 
-#endif /* CONFIG_PCI */
 
 __inline__ void virtual_dma_init(void)
 {
diff -ruN linus-bk-dma.4/include/asm-ppc64/iSeries/iSeries_io.h linus-bk-dma.5/include/asm-ppc64/iSeries/iSeries_io.h
--- linus-bk-dma.4/include/asm-ppc64/iSeries/iSeries_io.h	2004-09-14 21:06:08.000000000 +1000
+++ linus-bk-dma.5/include/asm-ppc64/iSeries/iSeries_io.h	2005-02-09 17:57:36.000000000 +1100
@@ -31,6 +31,7 @@
 /*   Created December 28, 2000                                          */
 /* End Change Activity                                                  */
 /************************************************************************/
+#ifdef CONFIG_PCI
 extern u8   iSeries_Read_Byte(const volatile void __iomem * IoAddress);
 extern u16  iSeries_Read_Word(const volatile void __iomem * IoAddress);
 extern u32  iSeries_Read_Long(const volatile void __iomem * IoAddress);
@@ -41,6 +42,15 @@
 extern void iSeries_memset_io(volatile void __iomem *dest, char x, size_t n);
 extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source, size_t n);
 extern void iSeries_memcpy_fromio(void *dest, const volatile void __iomem *source, size_t n);
+#else	/* CONFIG_PCI */
+static inline u8   iSeries_Read_Byte(const volatile void __iomem * IoAddress)
+{
+	return 0xff;
+}
+static inline void iSeries_Write_Byte(u8  IoData, volatile void __iomem * IoAddress)
+{
+}
+#endif	/* CONFIG_PCI */
 
 #endif /* CONFIG_PPC_ISERIES */
 #endif /* _ISERIES_IO_H */
diff -ruN linus-bk-dma.4/include/asm-ppc64/io.h linus-bk-dma.5/include/asm-ppc64/io.h
--- linus-bk-dma.4/include/asm-ppc64/io.h	2005-01-29 06:05:47.000000000 +1100
+++ linus-bk-dma.5/include/asm-ppc64/io.h	2005-02-09 15:53:33.000000000 +1100
@@ -1,4 +1,4 @@
- #ifndef _PPC64_IO_H
+#ifndef _PPC64_IO_H
 #define _PPC64_IO_H
 
 /* 
@@ -31,6 +31,7 @@
 
 #define SLOW_DOWN_IO
 
+#ifdef CONFIG_PCI
 extern unsigned long isa_io_base;
 extern unsigned long pci_io_base;
 extern unsigned long io_page_mask;
@@ -39,6 +40,10 @@
 
 #define _IO_IS_VALID(port) ((port) >= MAX_ISA_PORT || (1 << (port>>PAGE_SHIFT)) \
 			    & io_page_mask)
+#else
+#define pci_io_base		0
+#define _IO_IS_VALID(port)	1
+#endif
 
 #ifdef CONFIG_PPC_ISERIES
 /* __raw_* accessors aren't supported on iSeries */
diff -ruN linus-bk-dma.4/include/asm-ppc64/iommu.h linus-bk-dma.5/include/asm-ppc64/iommu.h
--- linus-bk-dma.4/include/asm-ppc64/iommu.h	2005-02-07 15:02:01.000000000 +1100
+++ linus-bk-dma.5/include/asm-ppc64/iommu.h	2005-02-09 18:27:41.000000000 +1100
@@ -154,9 +154,14 @@
 extern void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle,
 		size_t size, enum dma_data_direction direction);
 
+#ifdef CONFIG_IBMIOMMU
 extern void iommu_init_early_pSeries(void);
 extern void iommu_init_early_iSeries(void);
 extern void iommu_init_early_u3(void);
+#else
+static inline void iommu_init_early_pSeries(void) {}
+static inline void iommu_init_early_iSeries(void) {}
+#endif
 
 extern void pci_iommu_init(void);
 extern void pci_direct_iommu_init(void);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050209/072e7567/attachment.pgp 


More information about the Linuxppc64-dev mailing list