|
@@ -161,16 +161,16 @@ static int page_size_mask;
|
|
|
|
|
|
static void __init probe_page_size_mask(void)
|
|
static void __init probe_page_size_mask(void)
|
|
{
|
|
{
|
|
-#if !defined(CONFIG_KMEMCHECK)
|
|
|
|
/*
|
|
/*
|
|
* For CONFIG_KMEMCHECK or pagealloc debugging, identity mapping will
|
|
* For CONFIG_KMEMCHECK or pagealloc debugging, identity mapping will
|
|
* use small pages.
|
|
* use small pages.
|
|
* This will simplify cpa(), which otherwise needs to support splitting
|
|
* This will simplify cpa(), which otherwise needs to support splitting
|
|
* large pages into small in interrupt context, etc.
|
|
* large pages into small in interrupt context, etc.
|
|
*/
|
|
*/
|
|
- if (boot_cpu_has(X86_FEATURE_PSE) && !debug_pagealloc_enabled())
|
|
|
|
|
|
+ if (boot_cpu_has(X86_FEATURE_PSE) && !debug_pagealloc_enabled() && !IS_ENABLED(CONFIG_KMEMCHECK))
|
|
page_size_mask |= 1 << PG_LEVEL_2M;
|
|
page_size_mask |= 1 << PG_LEVEL_2M;
|
|
-#endif
|
|
|
|
|
|
+ else
|
|
|
|
+ direct_gbpages = 0;
|
|
|
|
|
|
/* Enable PSE if available */
|
|
/* Enable PSE if available */
|
|
if (boot_cpu_has(X86_FEATURE_PSE))
|
|
if (boot_cpu_has(X86_FEATURE_PSE))
|