linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] UML - Add __raw_writel definition
@ 2006-01-15  6:33 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2006-01-15  6:33 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, user-mode-linux-devel, Bryan O'Sullivan

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>

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-15  5:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-15  6:33 [PATCH 3/3] UML - Add __raw_writel definition Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).