Skip to content

Commit

Permalink
x86/mm: Fix 'no5lvl' handling
Browse files Browse the repository at this point in the history
early_identify_cpu() has to use early version of pgtable_l5_enabled()
that doesn't rely on cpu_feature_enabled().

Defining USE_EARLY_PGTABLE_L5 before all includes does the trick.

I lost the define in one of reworks of the original patch.

Fixes: 372fddf ("x86/mm: Introduce the 'no5lvl' kernel parameter")
Signed-off-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
kiryl authored and KAGA-KOKO committed Jun 23, 2018
1 parent 51be133 commit 2458e53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* cpu_feature_enabled() cannot be used this early */
#define USE_EARLY_PGTABLE_L5

#include <linux/bootmem.h>
#include <linux/linkage.h>
#include <linux/bitops.h>
Expand Down

0 comments on commit 2458e53

Please sign in to comment.