| 
									
										
										
										
											2010-01-13 19:18:39 +09:00
										 |  |  | #ifndef __ASM_SH_PGTABLE_2LEVEL_H
 | 
					
						
							|  |  |  | #define __ASM_SH_PGTABLE_2LEVEL_H
 | 
					
						
							| 
									
										
										
										
											2009-11-25 22:00:08 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include <asm-generic/pgtable-nopmd.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * traditional two-level paging structure | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2010-01-13 19:11:14 +09:00
										 |  |  | #define PAGETABLE_LEVELS	2
 | 
					
						
							| 
									
										
										
										
											2009-11-25 22:00:08 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* PTE bits */ | 
					
						
							| 
									
										
										
										
											2010-01-13 19:11:14 +09:00
										 |  |  | #define PTE_MAGNITUDE		2	/* 32-bit PTEs */
 | 
					
						
							| 
									
										
										
										
											2009-11-25 22:00:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-13 19:11:14 +09:00
										 |  |  | #define PTE_SHIFT		PAGE_SHIFT
 | 
					
						
							|  |  |  | #define PTE_BITS		(PTE_SHIFT - PTE_MAGNITUDE)
 | 
					
						
							| 
									
										
										
										
											2009-11-25 22:00:08 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* PGD bits */ | 
					
						
							| 
									
										
										
										
											2010-01-13 19:11:14 +09:00
										 |  |  | #define PGDIR_SHIFT		(PTE_SHIFT + PTE_BITS)
 | 
					
						
							| 
									
										
										
										
											2009-11-25 22:00:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-13 19:11:14 +09:00
										 |  |  | #define PTRS_PER_PGD		(PAGE_SIZE / (1 << PTE_MAGNITUDE))
 | 
					
						
							| 
									
										
										
										
											2009-11-25 22:00:08 +00:00
										 |  |  | #define USER_PTRS_PER_PGD	(TASK_SIZE/PGDIR_SIZE)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-13 19:18:39 +09:00
										 |  |  | #endif /* __ASM_SH_PGTABLE_2LEVEL_H */
 |