linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] init/main: Init jump_labels before they are used to build zonelists
@ 2017-01-17 12:56 Stafford Horne
  2017-01-17 13:07 ` Vlastimil Babka
  0 siblings, 1 reply; 10+ messages in thread
From: Stafford Horne @ 2017-01-17 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Stafford Horne, Vlastimil Babka, Andrew Morton, Thomas Gleixner,
	Kees Cook, Jessica Yu, Petr Mladek, Rasmus Villemoes, Yang Shi,
	Tejun Heo, Prarit Bhargava, Yaowei Bai, Andrey Ryabinin

A recent change in -next introduced static_keys in init zonelists,
details are:

  Author: Vlastimil Babka <vbabka@suse.cz>
  Date:   Thu Jan 12 12:19:03 2017 +1100
  commit f5adbdff6a1c40e19 ("mm, page_alloc: convert
  page_group_by_mobility_disable to static key")

This causes the following warning in openrisc as reported by Guenter,
and repoduced by me.

 WARNING: CPU: 0 PID: 0 at ./include/linux/jump_label.h:198 0xc02d758c
 static_key_slow_inc used before call to jump_label_init

This fixes this by initialized jump_labels even earlier, I am suprized the
issue is not showing up in other platforms yet.

Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 init/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/init/main.c b/init/main.c
index 8b1adb6e..d1ca7cb 100644
--- a/init/main.c
+++ b/init/main.c
@@ -513,6 +513,7 @@ asmlinkage __visible void __init start_kernel(void)
 	boot_cpu_state_init();
 	smp_prepare_boot_cpu();	/* arch-specific boot-cpu hooks */
 
+	jump_label_init();
 	build_all_zonelists(NULL, NULL);
 	page_alloc_init();
 
@@ -526,8 +527,6 @@ asmlinkage __visible void __init start_kernel(void)
 		parse_args("Setting init args", after_dashes, NULL, 0, -1, -1,
 			   NULL, set_init_arg);
 
-	jump_label_init();
-
 	/*
 	 * These use large bootmem allocations and must precede
 	 * kmem_cache_init()
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-01-23  5:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-17 12:56 [PATCH -next] init/main: Init jump_labels before they are used to build zonelists Stafford Horne
2017-01-17 13:07 ` Vlastimil Babka
2017-01-17 13:44   ` Peter Zijlstra
2017-01-17 14:30     ` Stafford Horne
2017-01-17 16:11       ` Vlastimil Babka
2017-01-17 20:34         ` Andrew Morton
2017-01-17 20:49           ` Vlastimil Babka
2017-01-19  8:28             ` Vlastimil Babka
2017-01-19  9:56               ` Mel Gorman
2017-01-23  5:54     ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).