[PATCH 1/2] Allow ISA address

Jake Moilanen moilanen at austin.ibm.com
Sat Oct 29 06:20:41 EST 2005


> +EXPORT_SYMBOL(allow_isa_address);

Let's try EXPORT_SYMBOL_GPL().

Signed-off-by: Jake Moilanen <moilanen at austin.ibm.com>

--

Index: 2.6.14/arch/ppc64/kernel/pci.c
===================================================================
--- 2.6.14.orig/arch/ppc64/kernel/pci.c	2005-10-28 09:54:55.199422205 -0500
+++ 2.6.14/arch/ppc64/kernel/pci.c	2005-10-28 15:19:25.391050702 -0500
@@ -1107,6 +1107,26 @@
        return 0;
 }
 
+
+/* Allow IO access to pages that are in the ISA range */
+void __devinit allow_isa_address(unsigned long start, unsigned end)
+{
+	unsigned long mask;
+	
+	if (start < MAX_ISA_PORT) {
+		if (end > MAX_ISA_PORT)
+			end = MAX_ISA_PORT;
+
+		start >>= PAGE_SHIFT;
+		end >>= PAGE_SHIFT;
+
+		/* get the range of pages for the map */
+		mask = ((1 << (end+1)) - 1) ^ ((1 << start) - 1);
+		io_page_mask |= mask;
+	}
+}
+EXPORT_SYMBOL_GPL(allow_isa_address);
+
 static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
 {
 	struct pci_controller *hose = pci_bus_to_host(dev->bus);
@@ -1118,19 +1138,8 @@
 		start = res->start += offset;
 		end = res->end += offset;
 
-		/* Need to allow IO access to pages that are in the
-		   ISA range */
-		if (start < MAX_ISA_PORT) {
-			if (end > MAX_ISA_PORT)
-				end = MAX_ISA_PORT;
-
-			start >>= PAGE_SHIFT;
-			end >>= PAGE_SHIFT;
-
-			/* get the range of pages for the map */
-			mask = ((1 << (end+1)) - 1) ^ ((1 << start) - 1);
-			io_page_mask |= mask;
-		}
+		allow_isa_address(start, end);
+
 	} else if (res->flags & IORESOURCE_MEM) {
 		res->start += hose->pci_mem_offset;
 		res->end += hose->pci_mem_offset;
Index: 2.6.14/include/asm-ppc64/pci.h
===================================================================
--- 2.6.14.orig/include/asm-ppc64/pci.h	2005-10-28 09:55:01.897151985 -0500
+++ 2.6.14/include/asm-ppc64/pci.h	2005-10-28 14:21:26.932903810 -0500
@@ -172,6 +172,8 @@
 					 unsigned long size,
 					 pgprot_t prot);
 
+extern void __devinit allow_isa_address(unsigned long start, unsigned end);
+
 #ifdef CONFIG_PPC_MULTIPLATFORM
 #define HAVE_ARCH_PCI_RESOURCE_TO_USER
 extern void pci_resource_to_user(const struct pci_dev *dev, int bar,



More information about the Linuxppc64-dev mailing list