Contributors: 4
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Rabin Vincent |
133 |
97.08% |
2 |
33.33% |
Wang Nan |
2 |
1.46% |
2 |
33.33% |
Peter Zijlstra |
1 |
0.73% |
1 |
16.67% |
Greg Kroah-Hartman |
1 |
0.73% |
1 |
16.67% |
Total |
137 |
|
6 |
|
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <linux/jump_label.h>
#include <asm/patch.h>
#include <asm/insn.h>
static void __arch_jump_label_transform(struct jump_entry *entry,
enum jump_label_type type,
bool is_static)
{
void *addr = (void *)entry->code;
unsigned int insn;
if (type == JUMP_LABEL_JMP)
insn = arm_gen_branch(entry->code, entry->target);
else
insn = arm_gen_nop();
if (is_static)
__patch_text_early(addr, insn);
else
patch_text(addr, insn);
}
void arch_jump_label_transform(struct jump_entry *entry,
enum jump_label_type type)
{
__arch_jump_label_transform(entry, type, false);
}
void arch_jump_label_transform_static(struct jump_entry *entry,
enum jump_label_type type)
{
__arch_jump_label_transform(entry, type, true);
}