Commit e3f91083 authored by Kevin Hao's avatar Kevin Hao Committed by Michael Ellerman

jump_label: Make it possible for arches to invoke jump_label_init() earlier

Some arches (powerpc at least) would like to invoke jump_label_init()
much earlier in boot. So check static_key_initialized in order to make
sure this function runs only once.

LGTM-by: Ingo (http://marc.info/?l=linux-kernel&m=144049104329961&w=2)
Signed-off-by: default avatarKevin Hao <haokexin@gmail.com>
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent b8f1b4f8
...@@ -235,6 +235,9 @@ void __init jump_label_init(void) ...@@ -235,6 +235,9 @@ void __init jump_label_init(void)
struct static_key *key = NULL; struct static_key *key = NULL;
struct jump_entry *iter; struct jump_entry *iter;
if (static_key_initialized)
return;
jump_label_lock(); jump_label_lock();
jump_label_sort_entries(iter_start, iter_stop); jump_label_sort_entries(iter_start, iter_stop);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment