Subject: Re: [PATCH] powerpc: uninline of_iomap function

From: Christian Krafft <[email-masked]>
Date: Tue, 24 Apr 2007 17:32:02 +0200

From: Christian Krafft <[email-masked]>
There is no big reason to have that function inlined.

Signed-off-by: Christian Krafft <[email-masked]>

Index: linux-2.6.21-rc4/arch/powerpc/kernel/prom_parse.c
===================================================================
--- linux-2.6.21-rc4.orig/arch/powerpc/kernel/prom_parse.c
+++ linux-2.6.21-rc4/arch/powerpc/kernel/prom_parse.c
@@ -1042,3 +1042,15 @@ const void *of_get_mac_address(struct de
 }
 EXPORT_SYMBOL(of_get_mac_address);
 
+void __iomem *of_iomap(struct device_node *np, int index)
+{
+	struct resource res;
+
+	if (of_address_to_resource(np, index, &res))
+		return NULL;
+
+	return ioremap(res.start, 1 + res.end - res.start);
+}
+EXPORT_SYMBOL(of_iomap);
+
+
Index: linux-2.6.21-rc4/include/asm-powerpc/prom.h
===================================================================
--- linux-2.6.21-rc4.orig/include/asm-powerpc/prom.h
+++ linux-2.6.21-rc4/include/asm-powerpc/prom.h
@@ -19,7 +19,6 @@
 #include <linux/proc_fs.h>
 #include <linux/platform_device.h>
 #include <asm/atomic.h>
-#include <asm/io.h>
 
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
@@ -352,16 +351,14 @@ static inline int of_irq_to_resource(str
 	return irq;
 }
 
-static inline void __iomem *of_iomap(struct device_node *np, int index)
-{
-	struct resource res;
-
-	if (of_address_to_resource(np, index, &res))
-		return NULL;
-
-	return ioremap(res.start, 1 + res.end - res.start);
-}
-
+/**
+ * of_iomap - Maps the memory mapped IO for a given device_node
+ * @device:	the device whose io range will be mapped
+ * @index:	index of the io range
+ *
+ * Returns a pointer to the mapped memory
+ */
+extern void __iomem *of_iomap(struct device_node *device, int index);
 
 #endif /* __KERNEL__ */
 #endif /* _POWERPC_PROM_H */

-- 
Mit freundlichen Gruessen,
kind regards,

Christian Krafft
IBM Systems & Technology Group,
Linux Kernel Development
IT Specialist

Vorsitzender des Aufsichtsrats:	Johann Weihen
Geschaeftsfuehrung:		Herbert Kircher
Sitz der Gesellschaft:		Boeblingen
Registriergericht:		Amtsgericht Stuttgart, HRB 243294