summaryrefslogtreecommitdiffstats
path: root/arch/mips/Kconfig
diff options
context:
space:
mode:
authorAlex Belits <alex.belits@cavium.com>2017-02-16 20:27:34 -0500
committerRalf Baechle <ralf@linux-mips.org>2017-04-10 05:56:06 -0400
commit3377e227af441aff710726437adc20efc359fd9c (patch)
treed05610ba07eca74f783b42fbbd5110b7876d8c9b /arch/mips/Kconfig
parentdfa32261fa0ed1821c7d5dbb9e93eddfe311a0d9 (diff)
MIPS: Add 48-bit VA space (and 4-level page tables) for 4K pages.
Some users must have 4K pages while needing a 48-bit VA space size. The cleanest way do do this is to go to a 4-level page table for this case. Each page table level using order-0 pages adds 9 bits to the VA size (at 4K pages, so for four levels we get 9 * 4 + 12 == 48-bits. For the 4K page size case only we add support functions for the PUD level of the page table tree, also the TLB exception handlers get an extra level of tree walk. [david.daney@cavium.com: Forward port to v4.10.] [david.daney@cavium.com: Forward port to v4.11.] Signed-off-by: Alex Belits <alex.belits@cavium.com> Signed-off-by: David Daney <david.daney@cavium.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Alex Belits <alex.belits@cavium.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15312/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/Kconfig')
-rw-r--r--arch/mips/Kconfig13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 68af16b72e9c..f4dd2c322d4b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2121,10 +2121,13 @@ config MIPS_VA_BITS_48
2121 bool "48 bits virtual memory" 2121 bool "48 bits virtual memory"
2122 depends on 64BIT 2122 depends on 64BIT
2123 help 2123 help
2124 Support a maximum at least 48 bits of application virtual memory. 2124 Support a maximum at least 48 bits of application virtual
2125 Default is 40 bits or less, depending on the CPU. 2125 memory. Default is 40 bits or less, depending on the CPU.
2126 This option result in a small memory overhead for page tables. 2126 For page sizes 16k and above, this option results in a small
2127 This option is only supported with 16k and 64k page sizes. 2127 memory overhead for page tables. For 4k page size, a fourth
2128 level of page tables is added which imposes both a memory
2129 overhead as well as slower TLB fault handling.
2130
2128 If unsure, say N. 2131 If unsure, say N.
2129 2132
2130choice 2133choice
@@ -2134,7 +2137,6 @@ choice
2134config PAGE_SIZE_4KB 2137config PAGE_SIZE_4KB
2135 bool "4kB" 2138 bool "4kB"
2136 depends on !CPU_LOONGSON2 && !CPU_LOONGSON3 2139 depends on !CPU_LOONGSON2 && !CPU_LOONGSON3
2137 depends on !MIPS_VA_BITS_48
2138 help 2140 help
2139 This option select the standard 4kB Linux page size. On some 2141 This option select the standard 4kB Linux page size. On some
2140 R3000-family processors this is the only available page size. Using 2142 R3000-family processors this is the only available page size. Using
@@ -2983,6 +2985,7 @@ config HAVE_LATENCYTOP_SUPPORT
2983 2985
2984config PGTABLE_LEVELS 2986config PGTABLE_LEVELS
2985 int 2987 int
2988 default 4 if PAGE_SIZE_4KB && MIPS_VA_BITS_48
2986 default 3 if 64BIT && !PAGE_SIZE_64KB 2989 default 3 if 64BIT && !PAGE_SIZE_64KB
2987 default 2 2990 default 2
2988 2991