]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/um/include/mem.h
[PATCH] switch ide-tape
[linux-2.6-omap-h63xx.git] / arch / um / include / mem.h
index 99d3ad4a03e5ab5cd060390cc340b0fdf7f6faa4..5cd40e99e8d5c925ba0f7a983972f5153462a571 100644 (file)
@@ -1,29 +1,22 @@
 /* 
- * Copyright (C) 2002, 2003 Jeff Dike (jdike@addtoit.com)
+ * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Licensed under the GPL
  */
 
 #ifndef __MEM_H__
 #define __MEM_H__
 
-#include "linux/types.h"
+extern int phys_mapping(unsigned long phys, unsigned long long *offset_out);
 
-extern int phys_mapping(unsigned long phys, __u64 *offset_out);
-extern int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w);
-extern int is_remapped(void *virt);
-extern int physmem_remove_mapping(void *virt);
-extern void physmem_forget_descriptor(int fd);
-extern unsigned long to_phys(void *virt);
+extern unsigned long uml_physmem;
+static inline unsigned long to_phys(void *virt)
+{
+       return(((unsigned long) virt) - uml_physmem);
+}
 
-#endif
+static inline void *to_virt(unsigned long phys)
+{
+       return((void *) uml_physmem + phys);
+}
 
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
+#endif