| Paul Mundt | e44d6c4 | 2010-01-13 19:18:39 +0900 | [diff] [blame] | 1 | #ifndef __ASM_SH_PGTABLE_2LEVEL_H | 
 | 2 | #define __ASM_SH_PGTABLE_2LEVEL_H | 
| Matt Fleming | b73c806 | 2009-11-25 22:00:08 +0000 | [diff] [blame] | 3 |  | 
 | 4 | #include <asm-generic/pgtable-nopmd.h> | 
 | 5 |  | 
 | 6 | /* | 
 | 7 |  * traditional two-level paging structure | 
 | 8 |  */ | 
| Paul Mundt | 782bb5a | 2010-01-13 19:11:14 +0900 | [diff] [blame] | 9 | #define PAGETABLE_LEVELS	2 | 
| Matt Fleming | b73c806 | 2009-11-25 22:00:08 +0000 | [diff] [blame] | 10 |  | 
 | 11 | /* PTE bits */ | 
| Paul Mundt | 782bb5a | 2010-01-13 19:11:14 +0900 | [diff] [blame] | 12 | #define PTE_MAGNITUDE		2	/* 32-bit PTEs */ | 
| Matt Fleming | b73c806 | 2009-11-25 22:00:08 +0000 | [diff] [blame] | 13 |  | 
| Paul Mundt | 782bb5a | 2010-01-13 19:11:14 +0900 | [diff] [blame] | 14 | #define PTE_SHIFT		PAGE_SHIFT | 
 | 15 | #define PTE_BITS		(PTE_SHIFT - PTE_MAGNITUDE) | 
| Matt Fleming | b73c806 | 2009-11-25 22:00:08 +0000 | [diff] [blame] | 16 |  | 
 | 17 | /* PGD bits */ | 
| Paul Mundt | 782bb5a | 2010-01-13 19:11:14 +0900 | [diff] [blame] | 18 | #define PGDIR_SHIFT		(PTE_SHIFT + PTE_BITS) | 
| Matt Fleming | b73c806 | 2009-11-25 22:00:08 +0000 | [diff] [blame] | 19 |  | 
| Paul Mundt | 782bb5a | 2010-01-13 19:11:14 +0900 | [diff] [blame] | 20 | #define PTRS_PER_PGD		(PAGE_SIZE / (1 << PTE_MAGNITUDE)) | 
| Matt Fleming | b73c806 | 2009-11-25 22:00:08 +0000 | [diff] [blame] | 21 | #define USER_PTRS_PER_PGD	(TASK_SIZE/PGDIR_SIZE) | 
 | 22 |  | 
| Paul Mundt | e44d6c4 | 2010-01-13 19:18:39 +0900 | [diff] [blame] | 23 | #endif /* __ASM_SH_PGTABLE_2LEVEL_H */ |