[PATCH] PPC64 Allow PPC64 to build without EEH
Stephen Rothwell
sfr at canb.auug.org.au
Tue May 4 18:39:54 EST 2004
Hi all,
This patch attempts to make EEH configurable so that especially PMAC
can be built without it. Not having a good understanding of what it
does means that I may have missed something, so please have a look.
This has been compile tested with a PMAC config.
Constructive criticism welcome :-)
This patch is relative to my previous (no virtual IO) patch.
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
diff -ruN ppc64-linux-2.5.for-ames.2/arch/ppc64/Kconfig ppc64-linux-2.5.for-ames.3/arch/ppc64/Kconfig
--- ppc64-linux-2.5.for-ames.2/arch/ppc64/Kconfig 2004-05-04 16:51:39.000000000 +1000
+++ ppc64-linux-2.5.for-ames.3/arch/ppc64/Kconfig 2004-05-04 17:44:38.000000000 +1000
@@ -98,6 +98,14 @@
HyperVisor. This should usually be selected for pSeries or
iSeries machines.
+config PPC_EEH
+ depends on PPC_PSERIES
+ bool "Support for Enhanced I/O Error Handling"
+ default y if !PPC_PMAC
+ help
+ Support for Enhanced I/O Error Handling. For pSeries machines,
+ say Y.
+
config PPC_SPLPAR
depends on PPC_PSERIES
bool "Support for shared-processor logical partitions"
diff -ruN ppc64-linux-2.5.for-ames.2/arch/ppc64/configs/g5_defconfig ppc64-linux-2.5.for-ames.3/arch/ppc64/configs/g5_defconfig
--- ppc64-linux-2.5.for-ames.2/arch/ppc64/configs/g5_defconfig 2004-05-04 16:53:00.000000000 +1000
+++ ppc64-linux-2.5.for-ames.3/arch/ppc64/configs/g5_defconfig 2004-05-04 17:47:08.000000000 +1000
@@ -62,6 +62,7 @@
CONFIG_ALTIVEC=y
CONFIG_PPC_PMAC=y
# CONFIG_PPC_VIO is not set
+# CONFIG_PPC_EEH is not set
CONFIG_PMAC_DART=y
CONFIG_PPC_PMAC64=y
CONFIG_BOOTX_TEXT=y
diff -ruN ppc64-linux-2.5.for-ames.2/arch/ppc64/configs/pSeries_defconfig ppc64-linux-2.5.for-ames.3/arch/ppc64/configs/pSeries_defconfig
--- ppc64-linux-2.5.for-ames.2/arch/ppc64/configs/pSeries_defconfig 2004-05-04 16:54:15.000000000 +1000
+++ ppc64-linux-2.5.for-ames.3/arch/ppc64/configs/pSeries_defconfig 2004-05-04 17:47:34.000000000 +1000
@@ -60,6 +60,7 @@
CONFIG_ALTIVEC=y
# CONFIG_PPC_PMAC is not set
CONFIG_PPC_VIO=y
+CONFIG_PPC_EEH=y
# CONFIG_BOOTX_TEXT is not set
# CONFIG_POWER4_ONLY is not set
# CONFIG_IOMMU_VMERGE is not set
diff -ruN ppc64-linux-2.5.for-ames.2/arch/ppc64/defconfig ppc64-linux-2.5.for-ames.3/arch/ppc64/defconfig
--- ppc64-linux-2.5.for-ames.2/arch/ppc64/defconfig 2004-05-04 16:52:24.000000000 +1000
+++ ppc64-linux-2.5.for-ames.3/arch/ppc64/defconfig 2004-05-04 17:46:33.000000000 +1000
@@ -60,6 +60,7 @@
CONFIG_ALTIVEC=y
# CONFIG_PPC_PMAC is not set
CONFIG_PPC_VIO=y
+CONFIG_PPC_EEH=y
# CONFIG_BOOTX_TEXT is not set
# CONFIG_POWER4_ONLY is not set
# CONFIG_IOMMU_VMERGE is not set
diff -ruN ppc64-linux-2.5.for-ames.2/arch/ppc64/kernel/Makefile ppc64-linux-2.5.for-ames.3/arch/ppc64/kernel/Makefile
--- ppc64-linux-2.5.for-ames.2/arch/ppc64/kernel/Makefile 2004-05-04 16:17:57.000000000 +1000
+++ ppc64-linux-2.5.for-ames.3/arch/ppc64/kernel/Makefile 2004-05-04 17:45:20.000000000 +1000
@@ -32,7 +32,7 @@
iSeries_iommu.o
obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \
- eeh.o nvram.o pSeries_nvram.o rtasd.o ras.o \
+ nvram.o pSeries_nvram.o rtasd.o ras.o \
open_pic.o xics.o pSeries_htab.o rtas.o \
chrp_setup.o i8259.o prom.o pSeries_iommu.o
@@ -42,6 +42,7 @@
obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o
obj-$(CONFIG_PPC_RTAS) += rtas-proc.o
obj-$(CONFIG_SCANLOG) += scanlog.o
+obj-$(CONFIG_PPC_EEH) += eeh.o
obj-$(CONFIG_PPC_VIO) += vio.o
obj-$(CONFIG_VIOPATH) += viopath.o
obj-$(CONFIG_LPARCFG) += lparcfg.o
diff -ruN ppc64-linux-2.5.for-ames.2/include/asm-ppc64/eeh.h ppc64-linux-2.5.for-ames.3/include/asm-ppc64/eeh.h
--- ppc64-linux-2.5.for-ames.2/include/asm-ppc64/eeh.h 2004-04-13 18:06:17.000000000 +1000
+++ ppc64-linux-2.5.for-ames.3/include/asm-ppc64/eeh.h 2004-05-04 18:19:07.000000000 +1000
@@ -20,6 +20,7 @@
#ifndef _PPC64_EEH_H
#define _PPC64_EEH_H
+#include <linux/config.h>
#include <linux/string.h>
#include <linux/init.h>
@@ -41,11 +42,31 @@
#define EEH_MODE_SUPPORTED (1<<0)
#define EEH_MODE_NOCHECK (1<<1)
+#ifdef CONFIG_PPC_EEH
+
extern void __init eeh_init(void);
unsigned long eeh_check_failure(void *token, unsigned long val);
void *eeh_ioremap(unsigned long addr, void *vaddr);
void __init pci_addr_cache_build(void);
+#else /* CONFIG_PPC_EEH */
+
+static inline void __init eeh_init(void) { }
+
+static inline unsigned long eeh_check_failure(void *token, unsigned long val)
+{
+ return val;
+}
+
+static inline void *eeh_ioremap(unsigned long addr, void *vaddr)
+{
+ return vaddr;
+}
+
+static inline void __init pci_addr_cache_build(void) { }
+
+#endif /* CONFIG_PPC_EEH */
+
/**
* eeh_add_device - perform EEH initialization for the indicated pci device
* @dev: pci device for which to set up EEH
@@ -73,6 +94,7 @@
#define EEH_RELEASE_DMA 3
int eeh_set_option(struct pci_dev *dev, int options);
+#ifdef CONFIG_PPC_EEH
/*
* EEH_POSSIBLE_ERROR() -- test for possible MMIO failure.
*
@@ -94,6 +116,13 @@
#define EEH_POSSIBLE_ERROR(addr, vaddr, val, type) \
((vaddr) != (addr) && EEH_POSSIBLE_IO_ERROR(val, type))
+#else /* CONFIG_PPC_EEH */
+
+#define EEH_POSSIBLE_IO_ERROR(val, type) 0
+#define EEH_POSSIBLE_ERROR(addr, vaddr, val, type) 0
+
+#endif /* CONFIG_PPC_EEH */
+
/*
* MMIO read/write operations with EEH support.
*/
More information about the Linuxppc64-dev
mailing list