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>

+4 -33
+1 -10
arch/sparc64/Kconfig
··· 98 98 8KB and 64KB work quite well, since SPARC ELF sections 99 99 provide for up to 64KB alignment. 100 100 101 - Therefore, 512KB and 4MB are for expert hackers only. 102 - 103 101 If you don't know what to do, choose 8KB. 104 102 105 103 config SPARC64_PAGE_SIZE_64KB 106 104 bool "64KB" 107 - 108 - config SPARC64_PAGE_SIZE_512KB 109 - bool "512KB" 110 - 111 - config SPARC64_PAGE_SIZE_4MB 112 - bool "4MB" 113 105 114 106 endchoice 115 107 ··· 218 226 bool "4MB" 219 227 220 228 config HUGETLB_PAGE_SIZE_512K 221 - depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB 222 229 bool "512K" 223 230 224 231 config HUGETLB_PAGE_SIZE_64K 225 - depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB && !SPARC64_PAGE_SIZE_64KB 232 + depends on !SPARC64_PAGE_SIZE_64KB 226 233 bool "64K" 227 234 228 235 endchoice
+3 -3
arch/sparc64/lib/copy_page.S
··· 25 25 26 26 #define DCACHE_SIZE (PAGE_SIZE * 2) 27 27 28 - #if (PAGE_SHIFT == 13) || (PAGE_SHIFT == 19) 28 + #if (PAGE_SHIFT == 13) 29 29 #define PAGE_SIZE_REM 0x80 30 - #elif (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22) 30 + #elif (PAGE_SHIFT == 16) 31 31 #define PAGE_SIZE_REM 0x100 32 32 #else 33 33 #error Wrong PAGE_SHIFT specified ··· 198 198 cmp %o2, PAGE_SIZE_REM 199 199 bne,pt %xcc, 1b 200 200 add %o0, 0x40, %o0 201 - #if (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22) 201 + #if (PAGE_SHIFT == 16) 202 202 TOUCH(f0, f2, f4, f6, f8, f10, f12, f14) 203 203 ldda [%o1] ASI_BLK_P, %f32 204 204 stda %f48, [%o0] %asi
-6
arch/sparc64/mm/tsb.c
··· 96 96 #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) 97 97 #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_64K 98 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 99 #else 106 100 #error Broken base page size setting... 107 101 #endif
-4
include/asm-sparc/mmu_64.h
··· 34 34 #define CTX_PGSZ_BASE CTX_PGSZ_8KB 35 35 #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) 36 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 37 #else 42 38 #error No page size specified in kernel configuration 43 39 #endif
-4
include/asm-sparc/page_64.h
··· 7 7 #define PAGE_SHIFT 13 8 8 #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) 9 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 10 #else 15 11 #error No page size specified in kernel configuration 16 12 #endif
-6
include/asm-sparc/pgtable_64.h
··· 161 161 #elif PAGE_SHIFT == 16 162 162 #define _PAGE_SZBITS_4U _PAGE_SZ64K_4U 163 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 164 #else 171 165 #error Wrong PAGE_SHIFT specified 172 166 #endif