Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* 
0003  * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
0004  */
0005 
0006 #ifndef __MEM_H__
0007 #define __MEM_H__
0008 
0009 extern int phys_mapping(unsigned long phys, unsigned long long *offset_out);
0010 
0011 extern unsigned long uml_physmem;
0012 static inline unsigned long uml_to_phys(void *virt)
0013 {
0014     return(((unsigned long) virt) - uml_physmem);
0015 }
0016 
0017 static inline void *uml_to_virt(unsigned long phys)
0018 {
0019     return((void *) uml_physmem + phys);
0020 }
0021 
0022 #endif