diff options
Diffstat (limited to 'arch/parisc/include')
-rw-r--r-- | arch/parisc/include/asm/page.h | 13 | ||||
-rw-r--r-- | arch/parisc/include/asm/pgtable.h | 15 |
2 files changed, 12 insertions, 16 deletions
diff --git a/arch/parisc/include/asm/page.h b/arch/parisc/include/asm/page.h index c3941f09a878..7bc5125d7d4c 100644 --- a/arch/parisc/include/asm/page.h +++ b/arch/parisc/include/asm/page.h | |||
@@ -36,16 +36,7 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg); | |||
36 | */ | 36 | */ |
37 | #define STRICT_MM_TYPECHECKS | 37 | #define STRICT_MM_TYPECHECKS |
38 | #ifdef STRICT_MM_TYPECHECKS | 38 | #ifdef STRICT_MM_TYPECHECKS |
39 | typedef struct { unsigned long pte; | 39 | typedef struct { unsigned long pte; } pte_t; /* either 32 or 64bit */ |
40 | #if !defined(CONFIG_64BIT) | ||
41 | unsigned long future_flags; | ||
42 | /* XXX: it's possible to remove future_flags and change BITS_PER_PTE_ENTRY | ||
43 | to 2, but then strangely the identical 32bit kernel boots on a | ||
44 | c3000(pa20), but not any longer on a 715(pa11). | ||
45 | Still investigating... HelgeD. | ||
46 | */ | ||
47 | #endif | ||
48 | } pte_t; /* either 32 or 64bit */ | ||
49 | 40 | ||
50 | /* NOTE: even on 64 bits, these entries are __u32 because we allocate | 41 | /* NOTE: even on 64 bits, these entries are __u32 because we allocate |
51 | * the pmd and pgd in ZONE_DMA (i.e. under 4GB) */ | 42 | * the pmd and pgd in ZONE_DMA (i.e. under 4GB) */ |
@@ -111,7 +102,7 @@ extern int npmem_ranges; | |||
111 | #define BITS_PER_PMD_ENTRY 2 | 102 | #define BITS_PER_PMD_ENTRY 2 |
112 | #define BITS_PER_PGD_ENTRY 2 | 103 | #define BITS_PER_PGD_ENTRY 2 |
113 | #else | 104 | #else |
114 | #define BITS_PER_PTE_ENTRY 3 | 105 | #define BITS_PER_PTE_ENTRY 2 |
115 | #define BITS_PER_PMD_ENTRY 2 | 106 | #define BITS_PER_PMD_ENTRY 2 |
116 | #define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY | 107 | #define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY |
117 | #endif | 108 | #endif |
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 470a4b88124d..a27d2e200fb2 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h | |||
@@ -50,11 +50,7 @@ | |||
50 | printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) | 50 | printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) |
51 | 51 | ||
52 | /* This is the size of the initially mapped kernel memory */ | 52 | /* This is the size of the initially mapped kernel memory */ |
53 | #ifdef CONFIG_64BIT | ||
54 | #define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ | 53 | #define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ |
55 | #else | ||
56 | #define KERNEL_INITIAL_ORDER 23 /* 0 to 1<<23 = 8MB */ | ||
57 | #endif | ||
58 | #define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) | 54 | #define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) |
59 | 55 | ||
60 | #if defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB) | 56 | #if defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB) |
@@ -91,16 +87,25 @@ | |||
91 | 87 | ||
92 | /* Definitions for 1st level */ | 88 | /* Definitions for 1st level */ |
93 | #define PGDIR_SHIFT (PMD_SHIFT + BITS_PER_PMD) | 89 | #define PGDIR_SHIFT (PMD_SHIFT + BITS_PER_PMD) |
90 | #if (PGDIR_SHIFT + PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) > BITS_PER_LONG | ||
91 | #define BITS_PER_PGD (BITS_PER_LONG - PGDIR_SHIFT) | ||
92 | #else | ||
94 | #define BITS_PER_PGD (PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) | 93 | #define BITS_PER_PGD (PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) |
94 | #endif | ||
95 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 95 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
96 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 96 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
97 | #define PTRS_PER_PGD (1UL << BITS_PER_PGD) | 97 | #define PTRS_PER_PGD (1UL << BITS_PER_PGD) |
98 | #define USER_PTRS_PER_PGD PTRS_PER_PGD | 98 | #define USER_PTRS_PER_PGD PTRS_PER_PGD |
99 | 99 | ||
100 | #ifdef CONFIG_64BIT | ||
100 | #define MAX_ADDRBITS (PGDIR_SHIFT + BITS_PER_PGD) | 101 | #define MAX_ADDRBITS (PGDIR_SHIFT + BITS_PER_PGD) |
101 | #define MAX_ADDRESS (1UL << MAX_ADDRBITS) | 102 | #define MAX_ADDRESS (1UL << MAX_ADDRBITS) |
102 | |||
103 | #define SPACEID_SHIFT (MAX_ADDRBITS - 32) | 103 | #define SPACEID_SHIFT (MAX_ADDRBITS - 32) |
104 | #else | ||
105 | #define MAX_ADDRBITS (BITS_PER_LONG) | ||
106 | #define MAX_ADDRESS (1UL << MAX_ADDRBITS) | ||
107 | #define SPACEID_SHIFT 0 | ||
108 | #endif | ||
104 | 109 | ||
105 | /* This calculates the number of initial pages we need for the initial | 110 | /* This calculates the number of initial pages we need for the initial |
106 | * page tables */ | 111 | * page tables */ |