aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2009-04-02 08:07:10 -0400
committerRalf Baechle <ralf@linux-mips.org>2009-05-14 08:50:27 -0400
commitc52399bece85cd4b157dd772e9f20551f9f18d2f (patch)
tree1f503f581735e0f4e08bb9bd2a128a89396d7828 /arch
parent740ebe4a54fae1705705ec87ce511b16ffb50659 (diff)
MIPS: Cavium: Add support for 8k and 32k page sizes.
Beyond the requirements of the architecture standard Cavium also supports 8k and 32k pages. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: David Daney <ddaney@caviumnetworks.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/Kconfig16
-rw-r--r--arch/mips/include/asm/mipsregs.h11
-rw-r--r--arch/mips/include/asm/page.h3
-rw-r--r--arch/mips/include/asm/pgtable-64.h6
-rw-r--r--arch/mips/include/asm/thread_info.h3
-rw-r--r--arch/mips/lib/dump_tlb.c9
6 files changed, 44 insertions, 4 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 998e5db8cc0..023aa2d4650 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1411,13 +1411,12 @@ config PAGE_SIZE_4KB
1411 1411
1412config PAGE_SIZE_8KB 1412config PAGE_SIZE_8KB
1413 bool "8kB" 1413 bool "8kB"
1414 depends on EXPERIMENTAL && CPU_R8000 1414 depends on (EXPERIMENTAL && CPU_R8000) || CPU_CAVIUM_OCTEON
1415 help 1415 help
1416 Using 8kB page size will result in higher performance kernel at 1416 Using 8kB page size will result in higher performance kernel at
1417 the price of higher memory consumption. This option is available 1417 the price of higher memory consumption. This option is available
1418 only on the R8000 processor. Not that at the time of this writing 1418 only on R8000 and cnMIPS processors. Note that you will need a
1419 this option is still high experimental; there are also issues with 1419 suitable Linux distribution to support this.
1420 compatibility of user applications.
1421 1420
1422config PAGE_SIZE_16KB 1421config PAGE_SIZE_16KB
1423 bool "16kB" 1422 bool "16kB"
@@ -1428,6 +1427,15 @@ config PAGE_SIZE_16KB
1428 all non-R3000 family processors. Note that you will need a suitable 1427 all non-R3000 family processors. Note that you will need a suitable
1429 Linux distribution to support this. 1428 Linux distribution to support this.
1430 1429
1430config PAGE_SIZE_32KB
1431 bool "32kB"
1432 depends on CPU_CAVIUM_OCTEON
1433 help
1434 Using 32kB page size will result in higher performance kernel at
1435 the price of higher memory consumption. This option is available
1436 only on cnMIPS cores. Note that you will need a suitable Linux
1437 distribution to support this.
1438
1431config PAGE_SIZE_64KB 1439config PAGE_SIZE_64KB
1432 bool "64kB" 1440 bool "64kB"
1433 depends on EXPERIMENTAL && !CPU_R3000 && !CPU_TX39XX 1441 depends on EXPERIMENTAL && !CPU_R3000 && !CPU_TX39XX
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 1f798779378..0ef30c81fea 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -184,12 +184,19 @@
184#else 184#else
185 185
186#define PM_4K 0x00000000 186#define PM_4K 0x00000000
187#define PM_8K 0x00002000
187#define PM_16K 0x00006000 188#define PM_16K 0x00006000
189#define PM_32K 0x0000e000
188#define PM_64K 0x0001e000 190#define PM_64K 0x0001e000
191#define PM_128K 0x0003e000
189#define PM_256K 0x0007e000 192#define PM_256K 0x0007e000
193#define PM_512K 0x000fe000
190#define PM_1M 0x001fe000 194#define PM_1M 0x001fe000
195#define PM_2M 0x003fe000
191#define PM_4M 0x007fe000 196#define PM_4M 0x007fe000
197#define PM_8M 0x00ffe000
192#define PM_16M 0x01ffe000 198#define PM_16M 0x01ffe000
199#define PM_32M 0x03ffe000
193#define PM_64M 0x07ffe000 200#define PM_64M 0x07ffe000
194#define PM_256M 0x1fffe000 201#define PM_256M 0x1fffe000
195#define PM_1G 0x7fffe000 202#define PM_1G 0x7fffe000
@@ -201,8 +208,12 @@
201 */ 208 */
202#ifdef CONFIG_PAGE_SIZE_4KB 209#ifdef CONFIG_PAGE_SIZE_4KB
203#define PM_DEFAULT_MASK PM_4K 210#define PM_DEFAULT_MASK PM_4K
211#elif defined(CONFIG_PAGE_SIZE_8KB)
212#define PM_DEFAULT_MASK PM_8K
204#elif defined(CONFIG_PAGE_SIZE_16KB) 213#elif defined(CONFIG_PAGE_SIZE_16KB)
205#define PM_DEFAULT_MASK PM_16K 214#define PM_DEFAULT_MASK PM_16K
215#elif defined(CONFIG_PAGE_SIZE_32KB)
216#define PM_DEFAULT_MASK PM_32K
206#elif defined(CONFIG_PAGE_SIZE_64KB) 217#elif defined(CONFIG_PAGE_SIZE_64KB)
207#define PM_DEFAULT_MASK PM_64K 218#define PM_DEFAULT_MASK PM_64K
208#else 219#else
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index fe7a88ea066..9f946e4ca05 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -23,6 +23,9 @@
23#ifdef CONFIG_PAGE_SIZE_16KB 23#ifdef CONFIG_PAGE_SIZE_16KB
24#define PAGE_SHIFT 14 24#define PAGE_SHIFT 14
25#endif 25#endif
26#ifdef CONFIG_PAGE_SIZE_32KB
27#define PAGE_SHIFT 15
28#endif
26#ifdef CONFIG_PAGE_SIZE_64KB 29#ifdef CONFIG_PAGE_SIZE_64KB
27#define PAGE_SHIFT 16 30#define PAGE_SHIFT 16
28#endif 31#endif
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h
index 943515f0ef8..4ed9d1bba2b 100644
--- a/arch/mips/include/asm/pgtable-64.h
+++ b/arch/mips/include/asm/pgtable-64.h
@@ -83,6 +83,12 @@
83#define PMD_ORDER 0 83#define PMD_ORDER 0
84#define PTE_ORDER 0 84#define PTE_ORDER 0
85#endif 85#endif
86#ifdef CONFIG_PAGE_SIZE_32KB
87#define PGD_ORDER 0
88#define PUD_ORDER aieeee_attempt_to_allocate_pud
89#define PMD_ORDER 0
90#define PTE_ORDER 0
91#endif
86#ifdef CONFIG_PAGE_SIZE_64KB 92#ifdef CONFIG_PAGE_SIZE_64KB
87#define PGD_ORDER 0 93#define PGD_ORDER 0
88#define PUD_ORDER aieeee_attempt_to_allocate_pud 94#define PUD_ORDER aieeee_attempt_to_allocate_pud
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
index 676aa2ae191..143a48136a4 100644
--- a/arch/mips/include/asm/thread_info.h
+++ b/arch/mips/include/asm/thread_info.h
@@ -75,6 +75,9 @@ register struct thread_info *__current_thread_info __asm__("$28");
75#ifdef CONFIG_PAGE_SIZE_16KB 75#ifdef CONFIG_PAGE_SIZE_16KB
76#define THREAD_SIZE_ORDER (0) 76#define THREAD_SIZE_ORDER (0)
77#endif 77#endif
78#ifdef CONFIG_PAGE_SIZE_32KB
79#define THREAD_SIZE_ORDER (0)
80#endif
78#ifdef CONFIG_PAGE_SIZE_64KB 81#ifdef CONFIG_PAGE_SIZE_64KB
79#define THREAD_SIZE_ORDER (0) 82#define THREAD_SIZE_ORDER (0)
80#endif 83#endif
diff --git a/arch/mips/lib/dump_tlb.c b/arch/mips/lib/dump_tlb.c
index 779821cd54a..3f69725556a 100644
--- a/arch/mips/lib/dump_tlb.c
+++ b/arch/mips/lib/dump_tlb.c
@@ -19,6 +19,15 @@ static inline const char *msk2str(unsigned int mask)
19 case PM_16K: return "16kb"; 19 case PM_16K: return "16kb";
20 case PM_64K: return "64kb"; 20 case PM_64K: return "64kb";
21 case PM_256K: return "256kb"; 21 case PM_256K: return "256kb";
22#ifdef CONFIG_CPU_CAVIUM_OCTEON
23 case PM_8K: return "8kb";
24 case PM_32K: return "32kb";
25 case PM_128K: return "128kb";
26 case PM_512K: return "512kb";
27 case PM_2M: return "2Mb";
28 case PM_8M: return "8Mb";
29 case PM_32M: return "32Mb";
30#endif
22#ifndef CONFIG_CPU_VR41XX 31#ifndef CONFIG_CPU_VR41XX
23 case PM_1M: return "1Mb"; 32 case PM_1M: return "1Mb";
24 case PM_4M: return "4Mb"; 33 case PM_4M: return "4Mb";