mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
powerpc/code-patching: Use jump_label for testing freed initmem
Once init is done, initmem is freed forever so no need to test system_state at every call to patch_instruction(). Use jump_label. This reduces by 2% the time needed to activate ftrace on an 8xx. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/0aee964721cab7316cffde21a2ca223cee14d373.1647962456.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
cb3ac45214
commit
b033767848
3 changed files with 8 additions and 1 deletions
|
@ -22,6 +22,8 @@
|
|||
#define BRANCH_SET_LINK 0x1
|
||||
#define BRANCH_ABSOLUTE 0x2
|
||||
|
||||
DECLARE_STATIC_KEY_FALSE(init_mem_is_free);
|
||||
|
||||
bool is_offset_in_branch_range(long offset);
|
||||
bool is_offset_in_cond_branch_range(long offset);
|
||||
int create_branch(ppc_inst_t *instr, const u32 *addr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue