summaryrefslogtreecommitdiffstats
path: root/include/linux/jump_label.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-07-06 14:20:14 +0200
committerIngo Molnar <mingo@elte.hu>2011-12-06 20:41:03 +0100
commitac99b862fb98a36929831791da31714f709c2aa8 (patch)
tree93edba15ae7bb289b9a820af6e75d24e43ebea9a /include/linux/jump_label.h
parent9cdbe1cbac4ec318037297175587a0080acc9d11 (diff)
downloadblackbird-op-linux-ac99b862fb98a36929831791da31714f709c2aa8.tar.gz
blackbird-op-linux-ac99b862fb98a36929831791da31714f709c2aa8.zip
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 'include/linux/jump_label.h')
-rw-r--r--include/linux/jump_label.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index a1e7f909c801..5ce8b140428f 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -128,4 +128,7 @@ static inline void jump_label_rate_limit(struct jump_label_key_deferred *key,
}
#endif /* HAVE_JUMP_LABEL */
+#define jump_label_key_enabled ((struct jump_label_key){ .enabled = ATOMIC_INIT(1), })
+#define jump_label_key_disabled ((struct jump_label_key){ .enabled = ATOMIC_INIT(0), })
+
#endif /* _LINUX_JUMP_LABEL_H */
OpenPOWER on IntegriCloud