linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] um: Use generic io.h
@ 2012-01-25 17:23 Richard Weinberger
  2012-01-25 17:23 ` [PATCH 2/2] um: Serve io_remap_pfn_range() Richard Weinberger
  2012-01-30 18:23 ` [PATCH 1/2] um: Use generic io.h Al Viro
  0 siblings, 2 replies; 17+ messages in thread
From: Richard Weinberger @ 2012-01-25 17:23 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: linux-kernel, Richard Weinberger

There is no need to implement our own basic io functions.
All we need exists already in asm-generic/io.h

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 arch/um/include/asm/io.h |   53 +---------------------------------------------
 1 files changed, 1 insertions(+), 52 deletions(-)

diff --git a/arch/um/include/asm/io.h b/arch/um/include/asm/io.h
index 44e8b8c..cff48f0 100644
--- a/arch/um/include/asm/io.h
+++ b/arch/um/include/asm/io.h
@@ -1,57 +1,6 @@
 #ifndef __UM_IO_H
 #define __UM_IO_H
 
-#include "asm/page.h"
-
-#define IO_SPACE_LIMIT 0xdeadbeef /* Sure hope nothing uses this */
-
-static inline int inb(unsigned long i) { return(0); }
-static inline void outb(char c, unsigned long i) { }
-
-/*
- * Change virtual addresses to physical addresses and vv.
- * These are pretty trivial
- */
-static inline unsigned long virt_to_phys(volatile void * address)
-{
-	return __pa((void *) address);
-}
-
-static inline void * phys_to_virt(unsigned long address)
-{
-	return __va(address);
-}
-
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)	__va(p)
-
-/*
- * Convert a virtual cached pointer to an uncached pointer
- */
-#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;
-}
-static inline void writeq(unsigned int b, volatile void __iomem *addr)
-{
-	*(volatile unsigned long long __force *) addr = b;
-}
-#define __raw_writeb writeb
-#define __raw_writew writew
-#define __raw_writel writel
-#define __raw_writeq writeq
+#include <asm-generic/io.h>
 
 #endif
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-02-12 21:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-25 17:23 [PATCH 1/2] um: Use generic io.h Richard Weinberger
2012-01-25 17:23 ` [PATCH 2/2] um: Serve io_remap_pfn_range() Richard Weinberger
2012-01-30 18:23 ` [PATCH 1/2] um: Use generic io.h Al Viro
2012-01-30 19:10   ` Richard Weinberger
2012-01-30 19:25   ` Al Viro
2012-01-30 19:32     ` Al Viro
2012-01-30 19:57       ` Richard Weinberger
2012-02-03 23:17     ` [PATCH] um: Cleanup headers files Richard Weinberger
2012-02-04  0:14       ` Al Viro
2012-02-04  0:26         ` Richard Weinberger
2012-02-04  0:44         ` Richard Weinberger
2012-02-12 20:27           ` Al Viro
2012-02-12 21:01             ` Richard Weinberger
2012-02-12 21:20               ` Al Viro
2012-02-12 21:26                 ` Richard Weinberger
2012-02-12 21:28                   ` Al Viro
2012-02-04 14:05         ` Richard Weinberger

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).