[lkml]   [2013]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 7/7] init: execute jump_label_init() earlier
Patching of jump labels does not have to depend on any other init code,
so we should do it as soon as possible because static_keys cannot be
used before that.

If we find it does depend on something, the init case of patching should
be modified.

Signed-off-by: Radim Krčmář <>
There should be no reason to use static_key_enabled() now, I'll remove
it from api in following series if there are no objections.

I would also feel a bit safer with disabled interrupts, but it might not
be required.

init/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/init/main.c b/init/main.c
index 63d3e8f..c84fbb9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -489,6 +489,11 @@ asmlinkage void __init start_kernel(void)

+ /*
+ * Jump labels have undefined semantics before initialization
+ */
+ jump_label_init();

@@ -518,7 +523,6 @@ asmlinkage void __init start_kernel(void)
__stop___param - __start___param,
-1, -1, &unknown_bootoption);

- jump_label_init();

* These use large bootmem allocations and must precede
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2013-10-17 12:41    [W:0.097 / U:2.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site