2019-08-25 09:49:19 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2005-04-16 22:20:36 +00:00
|
|
|
/*
|
2007-10-16 08:27:05 +00:00
|
|
|
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
2005-04-16 22:20:36 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MEM_H__
|
|
|
|
#define __MEM_H__
|
|
|
|
|
2007-10-16 08:27:05 +00:00
|
|
|
extern int phys_mapping(unsigned long phys, unsigned long long *offset_out);
|
2005-09-10 17:44:56 +00: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 22:20:36 +00:00
|
|
|
|
|
|
|
#endif
|