2005-04-16 16:20:36 -06:00
|
|
|
/*
|
2007-10-16 02:27:05 -06:00
|
|
|
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
2005-04-16 16:20:36 -06:00
|
|
|
* Licensed under the GPL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MEM_H__
|
|
|
|
#define __MEM_H__
|
|
|
|
|
2007-10-16 02:27:05 -06:00
|
|
|
extern int phys_mapping(unsigned long phys, unsigned long long *offset_out);
|
2005-09-10 11:44:56 -06:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
#endif
|