gcov-kernel: Add ARM eABI support
[linux-2.6.git] / kernel / jump_label.c
index 51a175a..01d3b70 100644 (file)
@@ -71,6 +71,7 @@ void jump_label_inc(struct jump_label_key *key)
        atomic_inc(&key->enabled);
        jump_label_unlock();
 }
+EXPORT_SYMBOL_GPL(jump_label_inc);
 
 static void __jump_label_dec(struct jump_label_key *key,
                unsigned long rate_limit, struct delayed_work *work)
@@ -86,6 +87,7 @@ static void __jump_label_dec(struct jump_label_key *key,
 
        jump_label_unlock();
 }
+EXPORT_SYMBOL_GPL(jump_label_dec);
 
 static void jump_label_update_timeout(struct work_struct *work)
 {
@@ -142,7 +144,7 @@ static int __jump_label_text_reserved(struct jump_entry *iter_start,
  * running code can override this to make the non-live update case
  * cheaper.
  */
-void __weak arch_jump_label_transform_static(struct jump_entry *entry,
+void __weak __init_or_module arch_jump_label_transform_static(struct jump_entry *entry,
                                            enum jump_label_type type)
 {
        arch_jump_label_transform(entry, type); 
@@ -248,8 +250,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)
@@ -289,8 +296,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;