diff options
author | Greg KH <gregkh@suse.de> | 2005-09-12 21:10:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-12 21:10:59 +0200 |
commit | ad2c10f8f00d3fe2e37dd8a107e7cf4ac0459489 (patch) | |
tree | 5571f6a5784f51efddf9c1ee0408894cd63a460f /arch/um/include/mem.h | |
parent | [PATCH] I2C: i2c-nforce2: drop unused define (diff) | |
parent | [PATCH] x86-64: clean up local_add/sub arguments (diff) | |
download | linux-ad2c10f8f00d3fe2e37dd8a107e7cf4ac0459489.tar.xz linux-ad2c10f8f00d3fe2e37dd8a107e7cf4ac0459489.zip |
Merge ../torvalds-2.6/
Diffstat (limited to 'arch/um/include/mem.h')
-rw-r--r-- | arch/um/include/mem.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/um/include/mem.h b/arch/um/include/mem.h index 99d3ad4a03e5..e8ff0d8fa610 100644 --- a/arch/um/include/mem.h +++ b/arch/um/include/mem.h @@ -13,7 +13,17 @@ 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); +} + +static inline void *to_virt(unsigned long phys) +{ + return((void *) uml_physmem + phys); +} #endif |