diff options
author | David S. Miller <davem@davemloft.net> | 2018-04-21 22:31:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-21 22:32:48 +0200 |
commit | e0ada51db907ed2db5d46ad7ff86a8b5df68e59b (patch) | |
tree | 858966cee69ad8a50e59c4e02dcbde6ba2916151 /arch/x86/mm/init.c | |
parent | Merge branch 'ipv6-Another-followup-to-the-fib6_info-change' (diff) | |
parent | Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalent... (diff) | |
download | linux-e0ada51db907ed2db5d46ad7ff86a8b5df68e59b.tar.xz linux-e0ada51db907ed2db5d46ad7ff86a8b5df68e59b.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts were simple overlapping changes in microchip
driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/x86/mm/init.c')
-rw-r--r-- | arch/x86/mm/init.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 82f5252c723a..fec82b577c18 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -161,12 +161,6 @@ struct map_range { static int page_size_mask; -static void enable_global_pages(void) -{ - if (!static_cpu_has(X86_FEATURE_PTI)) - __supported_pte_mask |= _PAGE_GLOBAL; -} - static void __init probe_page_size_mask(void) { /* @@ -187,9 +181,15 @@ static void __init probe_page_size_mask(void) __supported_pte_mask &= ~_PAGE_GLOBAL; if (boot_cpu_has(X86_FEATURE_PGE)) { cr4_set_bits_and_update_boot(X86_CR4_PGE); - enable_global_pages(); + __supported_pte_mask |= _PAGE_GLOBAL; } + /* By the default is everything supported: */ + __default_kernel_pte_mask = __supported_pte_mask; + /* Except when with PTI where the kernel is mostly non-Global: */ + if (cpu_feature_enabled(X86_FEATURE_PTI)) + __default_kernel_pte_mask &= ~_PAGE_GLOBAL; + /* Enable 1 GB linear kernel mappings if available: */ if (direct_gbpages && boot_cpu_has(X86_FEATURE_GBPAGES)) { printk(KERN_INFO "Using GB pages for direct mapping\n"); |