diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-03-30 09:07:54 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-03-30 09:07:54 +0200 |
commit | 73fa1362a7f337d149f76d26b6c6845cb38c1af9 (patch) | |
tree | 8b66c4e1995515b366f3bbe1f908d8c214c27e06 /arch/x86/mm/init_32.c | |
parent | fdd3d8ce0ea62c32b039af45cc5538b728e366d9 (diff) | |
parent | 6415813bae75feba10b8ca3ed6634a72c2a4d313 (diff) |
Merge branch 'x86/cpu' into x86/mm, before applying dependent patch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r-- | arch/x86/mm/init_32.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 5ed3c141bbd5..7116a727fd5a 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -726,15 +726,17 @@ void __init paging_init(void) */ static void __init test_wp_bit(void) { + int wp_works_ok; + printk(KERN_INFO "Checking if this processor honours the WP bit even in supervisor mode..."); /* Any page-aligned address will do, the test is non-destructive */ __set_fixmap(FIX_WP_TEST, __pa(&swapper_pg_dir), PAGE_KERNEL_RO); - boot_cpu_data.wp_works_ok = do_test_wp_bit(); + wp_works_ok = do_test_wp_bit(); clear_fixmap(FIX_WP_TEST); - if (!boot_cpu_data.wp_works_ok) { + if (!wp_works_ok) { printk(KERN_CONT "No.\n"); panic("Linux doesn't support CPUs with broken WP."); } else { @@ -821,8 +823,7 @@ void __init mem_init(void) BUG_ON(VMALLOC_START >= VMALLOC_END); BUG_ON((unsigned long)high_memory > VMALLOC_START); - if (boot_cpu_data.wp_works_ok < 0) - test_wp_bit(); + test_wp_bit(); } #ifdef CONFIG_MEMORY_HOTPLUG |