2005-01-24 21:50:08

by Kumar Gala

[permalink] [raw]
Subject: [PATCH] ppc32: Missing call to ioremap in pci_iomap()

The PPC version of pci_iomap seems to be missing a call to ioremap. This
patch corrects that oversight and has been tested on a IBM PPC750FX Eval
board.

Signed-off-by Randy Vinson <[email protected]>
Signed-off-by Kumar Gala <[email protected]>

---
diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
--- a/arch/ppc/kernel/pci.c 2005-01-24 15:43:19 -06:00
+++ b/arch/ppc/kernel/pci.c 2005-01-24 15:43:19 -06:00
@@ -1712,7 +1712,11 @@
if (flags & IORESOURCE_IO)
return ioport_map(start, len);
if (flags & IORESOURCE_MEM)
- return (void __iomem *) start;
+ /* Not checking IORESOURCE_CACHEABLE because PPC does
+ * not currently distinguish between ioremap and
+ * ioremap_nocache.
+ */
+ return ioremap(start, len);
/* What? */
return NULL;
}


2005-01-25 02:40:28

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: [PATCH] ppc64: Missing call to ioremap in pci_iomap()

On Mon, 2005-01-24 at 15:46 -0600, Kumar Gala wrote:
> The PPC version of pci_iomap seems to be missing a call to ioremap. This
> patch corrects that oversight and has been tested on a IBM PPC750FX Eval
> board.

Looks like the ppc64 version as well !

This patch adds the missing ioremap call to pci_iomap on ppc64.

Signed-off-by: Benjamin Herrenschmidt <[email protected]>

Index: linux-work/arch/ppc64/kernel/iomap.c
===================================================================
--- linux-work.orig/arch/ppc64/kernel/iomap.c 2005-01-24 11:42:36.000000000 +1100
+++ linux-work/arch/ppc64/kernel/iomap.c 2005-01-25 13:33:13.000000000 +1100
@@ -113,7 +113,7 @@
if (flags & IORESOURCE_IO)
return ioport_map(start, len);
if (flags & IORESOURCE_MEM)
- return (void __iomem *) start;
+ return ioremap(start, len);
/* What? */
return NULL;
}