diff options
-rw-r--r-- | arch/x86/mm/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index cbc87ea98751..9b3f9fa5b283 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -161,16 +161,16 @@ static int page_size_mask; | |||
161 | 161 | ||
162 | static void __init probe_page_size_mask(void) | 162 | static void __init probe_page_size_mask(void) |
163 | { | 163 | { |
164 | #if !defined(CONFIG_KMEMCHECK) | ||
165 | /* | 164 | /* |
166 | * For CONFIG_KMEMCHECK or pagealloc debugging, identity mapping will | 165 | * For CONFIG_KMEMCHECK or pagealloc debugging, identity mapping will |
167 | * use small pages. | 166 | * use small pages. |
168 | * This will simplify cpa(), which otherwise needs to support splitting | 167 | * This will simplify cpa(), which otherwise needs to support splitting |
169 | * large pages into small in interrupt context, etc. | 168 | * large pages into small in interrupt context, etc. |
170 | */ | 169 | */ |
171 | if (boot_cpu_has(X86_FEATURE_PSE) && !debug_pagealloc_enabled()) | 170 | if (boot_cpu_has(X86_FEATURE_PSE) && !debug_pagealloc_enabled() && !IS_ENABLED(CONFIG_KMEMCHECK)) |
172 | page_size_mask |= 1 << PG_LEVEL_2M; | 171 | page_size_mask |= 1 << PG_LEVEL_2M; |
173 | #endif | 172 | else |
173 | direct_gbpages = 0; | ||
174 | 174 | ||
175 | /* Enable PSE if available */ | 175 | /* Enable PSE if available */ |
176 | if (boot_cpu_has(X86_FEATURE_PSE)) | 176 | if (boot_cpu_has(X86_FEATURE_PSE)) |