aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/Kconfig27
-rw-r--r--arch/powerpc/include/asm/highmem.h10
-rw-r--r--arch/powerpc/include/asm/mmu-44x.h2
-rw-r--r--arch/powerpc/include/asm/page.h6
-rw-r--r--arch/powerpc/include/asm/page_32.h4
-rw-r--r--arch/powerpc/include/asm/thread_info.h4
-rw-r--r--arch/powerpc/kernel/head_booke.h11
7 files changed, 55 insertions, 9 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index ccdd8de3c558..2d6d133c0edd 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -409,6 +409,18 @@ config PPC_HAS_HASH_64K
409 depends on PPC64 409 depends on PPC64
410 default n 410 default n
411 411
412config STDBINUTILS
413 bool "Using standard binutils settings"
414 depends on 44x
415 default y
416 help
417 Turning this option off allows you to select 256KB PAGE_SIZE on 44x.
418 Note, that kernel will be able to run only those applications,
419 which had been compiled using binutils later than 2.17.50.0.3 with
420 '-zmax-page-size' set to 256K (the default is 64K). Or, if using
421 the older binutils, you can patch them with a trivial patch, which
422 changes the ELF_MAXPAGESIZE definition from 0x10000 to 0x40000.
423
412choice 424choice
413 prompt "Page size" 425 prompt "Page size"
414 default PPC_4K_PAGES 426 default PPC_4K_PAGES
@@ -444,6 +456,19 @@ config PPC_64K_PAGES
444 bool "64k page size" if 44x || PPC_STD_MMU_64 456 bool "64k page size" if 44x || PPC_STD_MMU_64
445 select PPC_HAS_HASH_64K if PPC_STD_MMU_64 457 select PPC_HAS_HASH_64K if PPC_STD_MMU_64
446 458
459config PPC_256K_PAGES
460 bool "256k page size" if 44x
461 depends on !STDBINUTILS && (!SHMEM || BROKEN)
462 help
463 Make the page size 256k.
464
465 As the ELF standard only requires alignment to support page
466 sizes up to 64k, you will need to compile all of your user
467 space applications with a non-standard binutils settings
468 (see the STDBINUTILS description for details).
469
470 Say N unless you know what you are doing.
471
447endchoice 472endchoice
448 473
449config FORCE_MAX_ZONEORDER 474config FORCE_MAX_ZONEORDER
@@ -456,6 +481,8 @@ config FORCE_MAX_ZONEORDER
456 default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES 481 default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES
457 range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES 482 range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES
458 default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES 483 default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES
484 range 5 64 if PPC_STD_MMU_32 && PPC_256K_PAGES
485 default "5" if PPC_STD_MMU_32 && PPC_256K_PAGES
459 range 11 64 486 range 11 64
460 default "11" 487 default "11"
461 help 488 help
diff --git a/arch/powerpc/include/asm/highmem.h b/arch/powerpc/include/asm/highmem.h
index 04e4a620952e..a2907595067f 100644
--- a/arch/powerpc/include/asm/highmem.h
+++ b/arch/powerpc/include/asm/highmem.h
@@ -39,15 +39,15 @@ extern pte_t *pkmap_page_table;
39 * chunk of RAM. 39 * chunk of RAM.
40 */ 40 */
41/* 41/*
42 * We use one full pte table with 4K pages. And with 16K/64K pages pte 42 * We use one full pte table with 4K pages. And with 16K/64K/256K pages pte
43 * table covers enough memory (32MB and 512MB resp.) that both FIXMAP 43 * table covers enough memory (32MB/512MB/2GB resp.), so that both FIXMAP
44 * and PKMAP can be placed in single pte table. We use 1024 pages for 44 * and PKMAP can be placed in a single pte table. We use 512 pages for PKMAP
45 * PKMAP in case of 16K/64K pages. 45 * in case of 16K/64K/256K page sizes.
46 */ 46 */
47#ifdef CONFIG_PPC_4K_PAGES 47#ifdef CONFIG_PPC_4K_PAGES
48#define PKMAP_ORDER PTE_SHIFT 48#define PKMAP_ORDER PTE_SHIFT
49#else 49#else
50#define PKMAP_ORDER 10 50#define PKMAP_ORDER 9
51#endif 51#endif
52#define LAST_PKMAP (1 << PKMAP_ORDER) 52#define LAST_PKMAP (1 << PKMAP_ORDER)
53#ifndef CONFIG_PPC_4K_PAGES 53#ifndef CONFIG_PPC_4K_PAGES
diff --git a/arch/powerpc/include/asm/mmu-44x.h b/arch/powerpc/include/asm/mmu-44x.h
index 27cc6fdcd3b7..3c86576bfefa 100644
--- a/arch/powerpc/include/asm/mmu-44x.h
+++ b/arch/powerpc/include/asm/mmu-44x.h
@@ -83,6 +83,8 @@ typedef struct {
83#define PPC44x_TLBE_SIZE PPC44x_TLB_16K 83#define PPC44x_TLBE_SIZE PPC44x_TLB_16K
84#elif (PAGE_SHIFT == 16) 84#elif (PAGE_SHIFT == 16)
85#define PPC44x_TLBE_SIZE PPC44x_TLB_64K 85#define PPC44x_TLBE_SIZE PPC44x_TLB_64K
86#elif (PAGE_SHIFT == 18)
87#define PPC44x_TLBE_SIZE PPC44x_TLB_256K
86#else 88#else
87#error "Unsupported PAGE_SIZE" 89#error "Unsupported PAGE_SIZE"
88#endif 90#endif
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
index 197d569f5bd3..32cbf16f10ea 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -19,12 +19,14 @@
19#include <asm/kdump.h> 19#include <asm/kdump.h>
20 20
21/* 21/*
22 * On regular PPC32 page size is 4K (but we support 4K/16K/64K pages 22 * On regular PPC32 page size is 4K (but we support 4K/16K/64K/256K pages
23 * on PPC44x). For PPC64 we support either 4K or 64K software 23 * on PPC44x). For PPC64 we support either 4K or 64K software
24 * page size. When using 64K pages however, whether we are really supporting 24 * page size. When using 64K pages however, whether we are really supporting
25 * 64K pages in HW or not is irrelevant to those definitions. 25 * 64K pages in HW or not is irrelevant to those definitions.
26 */ 26 */
27#if defined(CONFIG_PPC_64K_PAGES) 27#if defined(CONFIG_PPC_256K_PAGES)
28#define PAGE_SHIFT 18
29#elif defined(CONFIG_PPC_64K_PAGES)
28#define PAGE_SHIFT 16 30#define PAGE_SHIFT 16
29#elif defined(CONFIG_PPC_16K_PAGES) 31#elif defined(CONFIG_PPC_16K_PAGES)
30#define PAGE_SHIFT 14 32#define PAGE_SHIFT 14
diff --git a/arch/powerpc/include/asm/page_32.h b/arch/powerpc/include/asm/page_32.h
index 1458d9500381..a0e3f6e6b4ee 100644
--- a/arch/powerpc/include/asm/page_32.h
+++ b/arch/powerpc/include/asm/page_32.h
@@ -19,7 +19,11 @@
19#define PTE_FLAGS_OFFSET 0 19#define PTE_FLAGS_OFFSET 0
20#endif 20#endif
21 21
22#ifdef CONFIG_PPC_256K_PAGES
23#define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2 - 2) /* 1/4 of a page */
24#else
22#define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2) /* full page */ 25#define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2) /* full page */
26#endif
23 27
24#ifndef __ASSEMBLY__ 28#ifndef __ASSEMBLY__
25/* 29/*
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h
index 9665a26a253a..e04286f92f61 100644
--- a/arch/powerpc/include/asm/thread_info.h
+++ b/arch/powerpc/include/asm/thread_info.h
@@ -12,8 +12,10 @@
12 12
13/* We have 8k stacks on ppc32 and 16k on ppc64 */ 13/* We have 8k stacks on ppc32 and 16k on ppc64 */
14 14
15#ifdef CONFIG_PPC64 15#if defined(CONFIG_PPC64)
16#define THREAD_SHIFT 14 16#define THREAD_SHIFT 14
17#elif defined(CONFIG_PPC_256K_PAGES)
18#define THREAD_SHIFT 15
17#else 19#else
18#define THREAD_SHIFT 13 20#define THREAD_SHIFT 13
19#endif 21#endif
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
index bec18078239d..69a4489bc86a 100644
--- a/arch/powerpc/kernel/head_booke.h
+++ b/arch/powerpc/kernel/head_booke.h
@@ -10,6 +10,15 @@
10 mtspr SPRN_IVOR##vector_number,r26; \ 10 mtspr SPRN_IVOR##vector_number,r26; \
11 sync 11 sync
12 12
13#if (THREAD_SHIFT < 15)
14#define ALLOC_STACK_FRAME(reg, val) \
15 addi reg,reg,val
16#else
17#define ALLOC_STACK_FRAME(reg, val) \
18 addis reg,reg,val@ha; \
19 addi reg,reg,val@l
20#endif
21
13#define NORMAL_EXCEPTION_PROLOG \ 22#define NORMAL_EXCEPTION_PROLOG \
14 mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ 23 mtspr SPRN_SPRG0,r10; /* save two registers to work with */\
15 mtspr SPRN_SPRG1,r11; \ 24 mtspr SPRN_SPRG1,r11; \
@@ -20,7 +29,7 @@
20 beq 1f; \ 29 beq 1f; \
21 mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\ 30 mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\
22 lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ 31 lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\
23 addi r1,r1,THREAD_SIZE; \ 32 ALLOC_STACK_FRAME(r1, THREAD_SIZE); \
241: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ 331: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\
25 mr r11,r1; \ 34 mr r11,r1; \
26 stw r10,_CCR(r11); /* save various registers */\ 35 stw r10,_CCR(r11); /* save various registers */\