Skip to contentSkip to conversation

ppc32: Missing call to ioremap in pci_iomap()

PATCH New Kumar Gala 2 participants 2 messages Jan 24, 2005 – Jan 25, 2005

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 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]>

---

arch/ppc/kernel/pci.c +5 -1
diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
@@ -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;
 }
#1 lore raw

PATCH 1/1 ppc64: Missing call to ioremap in pci_iomap()

Quoted 3 lines · Kumar Gala

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.

arch/ppc64/kernel/iomap.c +1 -1
Index: linux-work/arch/ppc64/kernel/iomap.c
===================================================================
@@ -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;
 }