X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fum%2Finclude%2Fmem.h;h=5cd40e99e8d5c925ba0f7a983972f5153462a571;hb=a4600f81393d685043fe2d485cf2b123301f467d;hp=99d3ad4a03e5ab5cd060390cc340b0fdf7f6faa4;hpb=c1b054d03f5b31c33eaa0b267c629b118eaf3790;p=linux-2.6-omap-h63xx.git diff --git a/arch/um/include/mem.h b/arch/um/include/mem.h index 99d3ad4a03e..5cd40e99e8d 100644 --- a/arch/um/include/mem.h +++ b/arch/um/include/mem.h @@ -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