diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-18 02:43:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 02:44:53 -0400 |
commit | f7fe93344fd3f4ccd406a35f751a61b77f94b0fc (patch) | |
tree | 2d164e040f6acde923147a53e5c92fa0ca0cf0ec | |
parent | d172ad18f9914f70c761a6cad470efc986d5e07e (diff) |
sparc64: Remove 4MB and 512K base page size options.
Adrian Bunk reported that enabling 4MB page size breaks the build.
The problem is that MAX_ORDER combined with the page shift exceeds the
SECTION_SIZE_BITS we use in asm-sparc64/sparsemem.h
There are several ways I suppose we could work around this. For one
we could define a CONFIG_FORCE_MAX_ZONEORDER to decrease MAX_ORDER in
these higher page size cases.
But I also know that these page size cases are broken wrt. TLB miss
handling especially on pre-hypervisor systems, and there isn't an easy
way to fix that.
These options were meant to be fun experimental hacks anyways, and
only 8K and 64K make any sense to support.
So remove 512K and 4M base page size support. Of course, we still
support these page sizes for huge pages.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc64/Kconfig | 11 | ||||
-rw-r--r-- | arch/sparc64/lib/copy_page.S | 6 | ||||
-rw-r--r-- | arch/sparc64/mm/tsb.c | 6 | ||||
-rw-r--r-- | include/asm-sparc/mmu_64.h | 4 | ||||
-rw-r--r-- | include/asm-sparc/page_64.h | 4 | ||||
-rw-r--r-- | include/asm-sparc/pgtable_64.h | 6 |
6 files changed, 4 insertions, 33 deletions
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 1aeb1da9829d..7c88263256af 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -98,19 +98,11 @@ config SPARC64_PAGE_SIZE_8KB | |||
98 | 8KB and 64KB work quite well, since SPARC ELF sections | 98 | 8KB and 64KB work quite well, since SPARC ELF sections |
99 | provide for up to 64KB alignment. | 99 | provide for up to 64KB alignment. |
100 | 100 | ||
101 | Therefore, 512KB and 4MB are for expert hackers only. | ||
102 | |||
103 | If you don't know what to do, choose 8KB. | 101 | If you don't know what to do, choose 8KB. |
104 | 102 | ||
105 | config SPARC64_PAGE_SIZE_64KB | 103 | config SPARC64_PAGE_SIZE_64KB |
106 | bool "64KB" | 104 | bool "64KB" |
107 | 105 | ||
108 | config SPARC64_PAGE_SIZE_512KB | ||
109 | bool "512KB" | ||
110 | |||
111 | config SPARC64_PAGE_SIZE_4MB | ||
112 | bool "4MB" | ||
113 | |||
114 | endchoice | 106 | endchoice |
115 | 107 | ||
116 | config SECCOMP | 108 | config SECCOMP |
@@ -226,11 +218,10 @@ config HUGETLB_PAGE_SIZE_4MB | |||
226 | bool "4MB" | 218 | bool "4MB" |
227 | 219 | ||
228 | config HUGETLB_PAGE_SIZE_512K | 220 | config HUGETLB_PAGE_SIZE_512K |
229 | depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB | ||
230 | bool "512K" | 221 | bool "512K" |
231 | 222 | ||
232 | config HUGETLB_PAGE_SIZE_64K | 223 | config HUGETLB_PAGE_SIZE_64K |
233 | depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB && !SPARC64_PAGE_SIZE_64KB | 224 | depends on !SPARC64_PAGE_SIZE_64KB |
234 | bool "64K" | 225 | bool "64K" |
235 | 226 | ||
236 | endchoice | 227 | endchoice |
diff --git a/arch/sparc64/lib/copy_page.S b/arch/sparc64/lib/copy_page.S index 37460666a5c3..b243d3b606ba 100644 --- a/arch/sparc64/lib/copy_page.S +++ b/arch/sparc64/lib/copy_page.S | |||
@@ -25,9 +25,9 @@ | |||
25 | 25 | ||
26 | #define DCACHE_SIZE (PAGE_SIZE * 2) | 26 | #define DCACHE_SIZE (PAGE_SIZE * 2) |
27 | 27 | ||
28 | #if (PAGE_SHIFT == 13) || (PAGE_SHIFT == 19) | 28 | #if (PAGE_SHIFT == 13) |
29 | #define PAGE_SIZE_REM 0x80 | 29 | #define PAGE_SIZE_REM 0x80 |
30 | #elif (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22) | 30 | #elif (PAGE_SHIFT == 16) |
31 | #define PAGE_SIZE_REM 0x100 | 31 | #define PAGE_SIZE_REM 0x100 |
32 | #else | 32 | #else |
33 | #error Wrong PAGE_SHIFT specified | 33 | #error Wrong PAGE_SHIFT specified |
@@ -198,7 +198,7 @@ cheetah_copy_page_insn: | |||
198 | cmp %o2, PAGE_SIZE_REM | 198 | cmp %o2, PAGE_SIZE_REM |
199 | bne,pt %xcc, 1b | 199 | bne,pt %xcc, 1b |
200 | add %o0, 0x40, %o0 | 200 | add %o0, 0x40, %o0 |
201 | #if (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22) | 201 | #if (PAGE_SHIFT == 16) |
202 | TOUCH(f0, f2, f4, f6, f8, f10, f12, f14) | 202 | TOUCH(f0, f2, f4, f6, f8, f10, f12, f14) |
203 | ldda [%o1] ASI_BLK_P, %f32 | 203 | ldda [%o1] ASI_BLK_P, %f32 |
204 | stda %f48, [%o0] %asi | 204 | stda %f48, [%o0] %asi |
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c index fe70c8a557b5..3547937b17a2 100644 --- a/arch/sparc64/mm/tsb.c +++ b/arch/sparc64/mm/tsb.c | |||
@@ -96,12 +96,6 @@ void flush_tsb_user(struct mmu_gather *mp) | |||
96 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) | 96 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) |
97 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_64K | 97 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_64K |
98 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_64K | 98 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_64K |
99 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_512KB) | ||
100 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_512K | ||
101 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_512K | ||
102 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_4MB) | ||
103 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_4MB | ||
104 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_4MB | ||
105 | #else | 99 | #else |
106 | #error Broken base page size setting... | 100 | #error Broken base page size setting... |
107 | #endif | 101 | #endif |
diff --git a/include/asm-sparc/mmu_64.h b/include/asm-sparc/mmu_64.h index 8abc58f0f9d7..9067dc500535 100644 --- a/include/asm-sparc/mmu_64.h +++ b/include/asm-sparc/mmu_64.h | |||
@@ -34,10 +34,6 @@ | |||
34 | #define CTX_PGSZ_BASE CTX_PGSZ_8KB | 34 | #define CTX_PGSZ_BASE CTX_PGSZ_8KB |
35 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) | 35 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) |
36 | #define CTX_PGSZ_BASE CTX_PGSZ_64KB | 36 | #define CTX_PGSZ_BASE CTX_PGSZ_64KB |
37 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_512KB) | ||
38 | #define CTX_PGSZ_BASE CTX_PGSZ_512KB | ||
39 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_4MB) | ||
40 | #define CTX_PGSZ_BASE CTX_PGSZ_4MB | ||
41 | #else | 37 | #else |
42 | #error No page size specified in kernel configuration | 38 | #error No page size specified in kernel configuration |
43 | #endif | 39 | #endif |
diff --git a/include/asm-sparc/page_64.h b/include/asm-sparc/page_64.h index 93f0881b766e..a8a2bba032c1 100644 --- a/include/asm-sparc/page_64.h +++ b/include/asm-sparc/page_64.h | |||
@@ -7,10 +7,6 @@ | |||
7 | #define PAGE_SHIFT 13 | 7 | #define PAGE_SHIFT 13 |
8 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) | 8 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) |
9 | #define PAGE_SHIFT 16 | 9 | #define PAGE_SHIFT 16 |
10 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_512KB) | ||
11 | #define PAGE_SHIFT 19 | ||
12 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_4MB) | ||
13 | #define PAGE_SHIFT 22 | ||
14 | #else | 10 | #else |
15 | #error No page size specified in kernel configuration | 11 | #error No page size specified in kernel configuration |
16 | #endif | 12 | #endif |
diff --git a/include/asm-sparc/pgtable_64.h b/include/asm-sparc/pgtable_64.h index 78d5594964a3..bb9ec2cce355 100644 --- a/include/asm-sparc/pgtable_64.h +++ b/include/asm-sparc/pgtable_64.h | |||
@@ -161,12 +161,6 @@ | |||
161 | #elif PAGE_SHIFT == 16 | 161 | #elif PAGE_SHIFT == 16 |
162 | #define _PAGE_SZBITS_4U _PAGE_SZ64K_4U | 162 | #define _PAGE_SZBITS_4U _PAGE_SZ64K_4U |
163 | #define _PAGE_SZBITS_4V _PAGE_SZ64K_4V | 163 | #define _PAGE_SZBITS_4V _PAGE_SZ64K_4V |
164 | #elif PAGE_SHIFT == 19 | ||
165 | #define _PAGE_SZBITS_4U _PAGE_SZ512K_4U | ||
166 | #define _PAGE_SZBITS_4V _PAGE_SZ512K_4V | ||
167 | #elif PAGE_SHIFT == 22 | ||
168 | #define _PAGE_SZBITS_4U _PAGE_SZ4MB_4U | ||
169 | #define _PAGE_SZBITS_4V _PAGE_SZ4MB_4V | ||
170 | #else | 164 | #else |
171 | #error Wrong PAGE_SHIFT specified | 165 | #error Wrong PAGE_SHIFT specified |
172 | #endif | 166 | #endif |