/* Target must have the right alignment and ISA must be preserved. */
BUG_ON((e->target & J_ALIGN_MASK) != J_ISA_BIT);
- if (type == JUMP_LABEL_ENABLE) {
+ if (type == JUMP_LABEL_JMP) {
insn.j_format.opcode = J_ISA_BIT ? mm_j32_op : j_op;
insn.j_format.target = e->target >> J_RANGE_SHIFT;
} else {
jump_label_lock();
if (atomic_read(&key->enabled) == 0) {
if (!jump_label_get_branch_default(key))
- jump_label_update(key, JUMP_LABEL_ENABLE);
+ jump_label_update(key, JUMP_LABEL_JMP);
else
- jump_label_update(key, JUMP_LABEL_DISABLE);
+ jump_label_update(key, JUMP_LABEL_NOP);
}
atomic_inc(&key->enabled);
jump_label_unlock();
schedule_delayed_work(work, rate_limit);
} else {
if (!jump_label_get_branch_default(key))
- jump_label_update(key, JUMP_LABEL_DISABLE);
+ jump_label_update(key, JUMP_LABEL_NOP);
else
- jump_label_update(key, JUMP_LABEL_ENABLE);
+ jump_label_update(key, JUMP_LABEL_JMP);
}
jump_label_unlock();
}
bool state = static_key_enabled(key);
if ((!true_branch && state) || (true_branch && !state))
- return JUMP_LABEL_ENABLE;
+ return JUMP_LABEL_JMP;
- return JUMP_LABEL_DISABLE;
+ return JUMP_LABEL_NOP;
}
void __init jump_label_init(void)
return;
for (iter = iter_start; iter < iter_stop; iter++) {
- arch_jump_label_transform_static(iter, JUMP_LABEL_DISABLE);
+ arch_jump_label_transform_static(iter, JUMP_LABEL_NOP);
}
}
jlm->next = key->next;
key->next = jlm;
- if (jump_label_type(key) == JUMP_LABEL_ENABLE)
- __jump_label_update(key, iter, iter_stop, JUMP_LABEL_ENABLE);
+ if (jump_label_type(key) == JUMP_LABEL_JMP)
+ __jump_label_update(key, iter, iter_stop, JUMP_LABEL_JMP);
}
return 0;