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