Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252654
b: refs/heads/master
c: 7cbc5b8
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Olsa authored and Steven Rostedt committed May 25, 2011
1 parent b0d4dea commit 66fb256
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 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: 9905ce8ad7b79dddd23c7b4753d0b2cdb65bde3c
refs/heads/master: 7cbc5b8d4a775a43875a09e29c49a2a8195b5b2d
18 changes: 13 additions & 5 deletions trunk/kernel/jump_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ static int __jump_label_text_reserved(struct jump_entry *iter_start,
}

static void __jump_label_update(struct jump_label_key *key,
struct jump_entry *entry, int enable)
struct jump_entry *entry,
struct jump_entry *stop, int enable)
{
for (; entry->key == (jump_label_t)(unsigned long)key; entry++) {
for (; (entry < stop) &&
(entry->key == (jump_label_t)(unsigned long)key);
entry++) {
/*
* entry->code set to 0 invalidates module init text sections
* kernel_text_address() verifies we are not in core kernel
Expand Down Expand Up @@ -181,7 +184,11 @@ static void __jump_label_mod_update(struct jump_label_key *key, int enable)
struct jump_label_mod *mod = key->next;

while (mod) {
__jump_label_update(key, mod->entries, enable);
struct module *m = mod->mod;

__jump_label_update(key, mod->entries,
m->jump_entries + m->num_jump_entries,
enable);
mod = mod->next;
}
}
Expand Down Expand Up @@ -245,7 +252,8 @@ static int jump_label_add_module(struct module *mod)
key->next = jlm;

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

return 0;
Expand Down Expand Up @@ -371,7 +379,7 @@ static void jump_label_update(struct jump_label_key *key, int enable)

/* if there are no users, entry can be NULL */
if (entry)
__jump_label_update(key, entry, enable);
__jump_label_update(key, entry, __stop___jump_table, enable);

#ifdef CONFIG_MODULES
__jump_label_mod_update(key, enable);
Expand Down

0 comments on commit 66fb256

Please sign in to comment.