diff options
author | Nadav Amit <nadav.amit@gmail.com> | 2019-05-04 21:11:24 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-05-05 14:32:46 -0400 |
commit | caa841360134f863987f2d4f77b8dc2fbb7596f8 (patch) | |
tree | fc3f7b45f92fc38599a509945ee8b6970eb2c3d8 /init | |
parent | 3950746d9d8ef981c1cb842384e0e86e8d1aad76 (diff) |
x86/mm: Initialize PGD cache during mm initialization
Poking-mm initialization might require to duplicate the PGD in early
stage. Initialize the PGD cache earlier to prevent boot failures.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nadav Amit <namit@vmware.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 4fc19708b165 ("x86/alternatives: Initialize temporary mm for patching")
Link: http://lkml.kernel.org/r/20190505011124.39692-1-namit@vmware.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c index 95dd9406ee31..9dc2f3b4f753 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -506,6 +506,8 @@ void __init __weak mem_encrypt_init(void) { } | |||
506 | 506 | ||
507 | void __init __weak poking_init(void) { } | 507 | void __init __weak poking_init(void) { } |
508 | 508 | ||
509 | void __init __weak pgd_cache_init(void) { } | ||
510 | |||
509 | bool initcall_debug; | 511 | bool initcall_debug; |
510 | core_param(initcall_debug, initcall_debug, bool, 0644); | 512 | core_param(initcall_debug, initcall_debug, bool, 0644); |
511 | 513 | ||
@@ -537,6 +539,7 @@ static void __init mm_init(void) | |||
537 | init_espfix_bsp(); | 539 | init_espfix_bsp(); |
538 | /* Should be run after espfix64 is set up. */ | 540 | /* Should be run after espfix64 is set up. */ |
539 | pti_init(); | 541 | pti_init(); |
542 | pgd_cache_init(); | ||
540 | } | 543 | } |
541 | 544 | ||
542 | void __init __weak arch_call_rest_init(void) | 545 | void __init __weak arch_call_rest_init(void) |