]> err.no Git - linux-2.6/commitdiff
[PATCH] uml: add __raw_writel definition
authorJeff Dike <jdike@addtoit.com>
Thu, 19 Jan 2006 01:42:38 +0000 (17:42 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 19 Jan 2006 03:20:18 +0000 (19:20 -0800)
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@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-um/io.h

index 90674056dcef4592fd65ab25375531884a2f6e4a..1934d9340e2cd6d5c0ca4c58f4ce1869edf97453 100644 (file)
@@ -33,4 +33,20 @@ static inline void * phys_to_virt(unsigned long address)
  */
 #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