Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277324
b: refs/heads/master
c: ac99b86
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Dec 6, 2011
1 parent 01e522e commit e8f9b80
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9cdbe1cbac4ec318037297175587a0080acc9d11
refs/heads/master: ac99b862fb98a36929831791da31714f709c2aa8
3 changes: 3 additions & 0 deletions trunk/include/linux/jump_label.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
12 changes: 8 additions & 4 deletions trunk/kernel/jump_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,13 @@ void jump_label_apply_nops(struct module *mod)
if (iter_start == iter_stop)
return;

for (iter = iter_start; iter < iter_stop; iter++)
arch_jump_label_transform_static(iter, JUMP_LABEL_DISABLE);
for (iter = iter_start; iter < iter_stop; iter++) {
struct jump_label_key *iterk;

iterk = (struct jump_label_key *)(unsigned long)iter->key;
arch_jump_label_transform_static(iter, jump_label_enabled(iterk) ?
JUMP_LABEL_ENABLE : JUMP_LABEL_DISABLE);
}
}

static int jump_label_add_module(struct module *mod)
Expand Down Expand Up @@ -289,8 +294,7 @@ static int jump_label_add_module(struct module *mod)
key->next = jlm;

if (jump_label_enabled(key))
__jump_label_update(key, iter, iter_stop,
JUMP_LABEL_ENABLE);
__jump_label_update(key, iter, iter_stop, JUMP_LABEL_ENABLE);
}

return 0;
Expand Down

0 comments on commit e8f9b80

Please sign in to comment.