diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2018-02-14 21:25:41 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-02-16 10:48:49 +0100 |
commit | 91f606a8fa68264224cbc76888fa8649cdbe9990 (patch) | |
tree | 6aa21758fdeba04876a471b800c05975092bedf8 /arch/x86/mm/ident_map.c | |
parent | 98219dda2ab56ce2a967fdebf81e838d676d9ddc (diff) | |
download | blackbird-op-linux-91f606a8fa68264224cbc76888fa8649cdbe9990.tar.gz blackbird-op-linux-91f606a8fa68264224cbc76888fa8649cdbe9990.zip |
x86/mm: Replace compile-time checks for 5-level paging with runtime-time checks
This patch converts the of CONFIG_X86_5LEVEL check to runtime checks for
p4d folding.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20180214182542.69302-9-kirill.shutemov@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm/ident_map.c')
-rw-r--r-- | arch/x86/mm/ident_map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c index ab33a32df2a8..9aa22be8331e 100644 --- a/arch/x86/mm/ident_map.c +++ b/arch/x86/mm/ident_map.c @@ -120,7 +120,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page, result = ident_p4d_init(info, p4d, addr, next); if (result) return result; - if (IS_ENABLED(CONFIG_X86_5LEVEL)) { + if (pgtable_l5_enabled) { set_pgd(pgd, __pgd(__pa(p4d) | info->kernpg_flag)); } else { /* |