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