linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [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



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ 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 [uml-devel] [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