mem.h (976e3645923bdd2fe7893aae33fd7a21098bfb28) | mem.h (097da1a44d1aef15739214fecf8f4c63792bb665) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 4 */ 5 6#ifndef __MEM_H__ 7#define __MEM_H__ 8 9extern int phys_mapping(unsigned long phys, unsigned long long *offset_out); 10 11extern unsigned long uml_physmem; | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 4 */ 5 6#ifndef __MEM_H__ 7#define __MEM_H__ 8 9extern int phys_mapping(unsigned long phys, unsigned long long *offset_out); 10 11extern unsigned long uml_physmem; |
12static inline unsigned long to_phys(void *virt) | 12static inline unsigned long uml_to_phys(void *virt) |
13{ 14 return(((unsigned long) virt) - uml_physmem); 15} 16 | 13{ 14 return(((unsigned long) virt) - uml_physmem); 15} 16 |
17static inline void *to_virt(unsigned long phys) | 17static inline void *uml_to_virt(unsigned long phys) |
18{ 19 return((void *) uml_physmem + phys); 20} 21 22#endif | 18{ 19 return((void *) uml_physmem + phys); 20} 21 22#endif |