Skip to content

Commit

Permalink
[PATCH] uml: add __raw_writel definition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Jan 19, 2006
1 parent 86c562a commit ea1eae7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/asm-um/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ea1eae7

Please sign in to comment.