blob: 5cd40e99e8d5c925ba0f7a983972f5153462a571 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Jeff Dike0a7675a2007-10-16 01:27:05 -07002 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * Licensed under the GPL
4 */
5
6#ifndef __MEM_H__
7#define __MEM_H__
8
Jeff Dike0a7675a2007-10-16 01:27:05 -07009extern int phys_mapping(unsigned long phys, unsigned long long *offset_out);
Paolo 'Blaisorblade' Giarrussod99c4022005-09-10 19:44:56 +020010
11extern unsigned long uml_physmem;
12static inline unsigned long to_phys(void *virt)
13{
14 return(((unsigned long) virt) - uml_physmem);
15}
16
17static inline void *to_virt(unsigned long phys)
18{
19 return((void *) uml_physmem + phys);
20}
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
22#endif