Skip to contentSkip to conversation

ppc64: Fix iSeries build (ouch !)

PATCH New Benjamin Herrenschmidt 1 participant 1 message Oct 19, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 ppc64: Fix iSeries build (ouch !)

Hi !

The move of iomap out of eeh inadvertently broke iSeries ... This patch fixes it. Please apply.

===== include/asm-ppc64/eeh.h 1.20 vs edited =====

include/asm-ppc64/eeh.h +0 -4
@@ -256,10 +256,6 @@
 
 #undef EEH_CHECK_ALIGN
 
-#define MAX_ISA_PORT 0x10000
-extern unsigned long io_page_mask;
-#define _IO_IS_VALID(port) ((port) >= MAX_ISA_PORT || (1 << (port>>PAGE_SHIFT)) & io_page_mask)
-
 static inline u8 eeh_inb(unsigned long port) {
 	u8 val;
 	if (!_IO_IS_VALID(port))

===== include/asm-ppc64/io.h 1.22 vs edited =====

include/asm-ppc64/io.h +6 -0
@@ -33,6 +33,12 @@
 
 extern unsigned long isa_io_base;
 extern unsigned long pci_io_base;
+extern unsigned long io_page_mask;
+
+#define MAX_ISA_PORT 0x10000
+
+#define _IO_IS_VALID(port) ((port) >= MAX_ISA_PORT || (1 << (port>>PAGE_SHIFT)) \
+			    & io_page_mask)
 
 #ifdef CONFIG_PPC_ISERIES
 /* __raw_* accessors aren't supported on iSeries */

===== arch/ppc64/kernel/iSeries_pci.c 1.24 vs edited =====

arch/ppc64/kernel/iSeries_pci.c +2 -0
@@ -55,6 +55,7 @@
 extern unsigned long iSeries_Base_Io_Memory;    
 
 extern struct iommu_table *tceTables[256];
+extern unsigned long io_page_mask;
 
 extern void iSeries_MmIoTest(void);
 
@@ -196,6 +197,7 @@
 	PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Entry.\n"); 
 	iSeries_IoMmTable_Initialize();
 	find_and_init_phbs();
+	io_page_mask = -1;
 	/* pci_assign_all_busses = 0;		SFRXXX*/
 	PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Exit.\n"); 
 }