aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/jump_label.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-07-06 08:20:14 -0400
committerIngo Molnar <mingo@elte.hu>2011-12-06 14:41:03 -0500
commitac99b862fb98a36929831791da31714f709c2aa8 (patch)
tree93edba15ae7bb289b9a820af6e75d24e43ebea9a /kernel/jump_label.c
parent9cdbe1cbac4ec318037297175587a0080acc9d11 (diff)
jump_label: Provide jump_label_key initializers
Provide two initializers for jump_label_key that initialize it enabled or disabled. Also modify all jump_label code to allow for jump_labels to be initialized enabled. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Jason Baron <jbaron@redhat.com> Link: http://lkml.kernel.org/n/tip-p40e3yj21b68y03z1yv825e7@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/jump_label.c')
-rw-r--r--kernel/jump_label.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index 3fb7b79c86fd..30c3c7708132 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -248,8 +248,13 @@ void jump_label_apply_nops(struct module *mod)
248 if (iter_start == iter_stop) 248 if (iter_start == iter_stop)
249 return; 249 return;
250 250
251 for (iter = iter_start; iter < iter_stop; iter++) 251 for (iter = iter_start; iter < iter_stop; iter++) {
252 arch_jump_label_transform_static(iter, JUMP_LABEL_DISABLE); 252 struct jump_label_key *iterk;
253
254 iterk = (struct jump_label_key *)(unsigned long)iter->key;
255 arch_jump_label_transform_static(iter, jump_label_enabled(iterk) ?
256 JUMP_LABEL_ENABLE : JUMP_LABEL_DISABLE);
257 }
253} 258}
254 259
255static int jump_label_add_module(struct module *mod) 260static int jump_label_add_module(struct module *mod)
@@ -289,8 +294,7 @@ static int jump_label_add_module(struct module *mod)
289 key->next = jlm; 294 key->next = jlm;
290 295
291 if (jump_label_enabled(key)) 296 if (jump_label_enabled(key))
292 __jump_label_update(key, iter, iter_stop, 297 __jump_label_update(key, iter, iter_stop, JUMP_LABEL_ENABLE);
293 JUMP_LABEL_ENABLE);
294 } 298 }
295 299
296 return 0; 300 return 0;