[PATCH 3/3] UML - Add __raw_writel definition

From: Jeff Dike
Date: Sun Jan 15 2006 - 00:40:47 EST


Add implementations of the write* and __raw_write* functions. __raw_writel
is needed by lib/iocopy.c, which shouldn't be used in UML, but which is
unconditionally linked in anyway.

Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>

Index: linux-2.6.15-mm/include/asm-um/io.h
===================================================================
--- linux-2.6.15-mm.orig/include/asm-um/io.h 2005-08-28 19:41:01.000000000 -0400
+++ linux-2.6.15-mm/include/asm-um/io.h 2006-01-14 19:12:17.000000000 -0500
@@ -33,4 +33,20 @@ static inline void * phys_to_virt(unsign
*/
#define xlate_dev_kmem_ptr(p) p

+static inline void writeb(unsigned char b, volatile void __iomem *addr)
+{
+ *(volatile unsigned char __force *) addr = b;
+}
+static inline void writew(unsigned short b, volatile void __iomem *addr)
+{
+ *(volatile unsigned short __force *) addr = b;
+}
+static inline void writel(unsigned int b, volatile void __iomem *addr)
+{
+ *(volatile unsigned int __force *) addr = b;
+}
+#define __raw_writeb writeb
+#define __raw_writew writew
+#define __raw_writel writel
+
#endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/