diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-05-06 22:34:00 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-05-12 15:54:55 +0300 |
commit | 5af0ea293d78c8b8f0b87ae2b13f7ac584057bc3 (patch) | |
tree | 041c397efaf5536d0d1fa709d69d53704186938e /include/linux/jump_label.h | |
parent | 001951bea748d3f675e1778f42b17290a8c551bf (diff) | |
download | linux-5af0ea293d78c8b8f0b87ae2b13f7ac584057bc3.tar.xz |
jump_label: Free jump_entry::key bit1 for build use
Have jump_label_init() set jump_entry::key bit1 to either 0 ot 1
unconditionally. This makes it available for build-time games.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210506194157.906893264@infradead.org
Diffstat (limited to 'include/linux/jump_label.h')
-rw-r--r-- | include/linux/jump_label.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 8c45f58292ac..48b9b2a82767 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -171,9 +171,12 @@ static inline bool jump_entry_is_init(const struct jump_entry *entry) return (unsigned long)entry->key & 2UL; } -static inline void jump_entry_set_init(struct jump_entry *entry) +static inline void jump_entry_set_init(struct jump_entry *entry, bool set) { - entry->key |= 2; + if (set) + entry->key |= 2; + else + entry->key &= ~2; } static inline int jump_entry_size(struct jump_entry *entry) |