code-patching.h (0aea30a07ec6b50de0fc5f5b2ec34a68ead86b61) code-patching.h (b033767848c4115e486b1a51946de3bee2ac0fa6)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2#ifndef _ASM_POWERPC_CODE_PATCHING_H
3#define _ASM_POWERPC_CODE_PATCHING_H
4
5/*
6 * Copyright 2008, Michael Ellerman, IBM Corporation.
7 */
8

--- 8 unchanged lines hidden (view full) ---

17 * "b" == create_branch(addr, target, 0);
18 * "ba" == create_branch(addr, target, BRANCH_ABSOLUTE);
19 * "bl" == create_branch(addr, target, BRANCH_SET_LINK);
20 * "bla" == create_branch(addr, target, BRANCH_ABSOLUTE | BRANCH_SET_LINK);
21 */
22#define BRANCH_SET_LINK 0x1
23#define BRANCH_ABSOLUTE 0x2
24
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2#ifndef _ASM_POWERPC_CODE_PATCHING_H
3#define _ASM_POWERPC_CODE_PATCHING_H
4
5/*
6 * Copyright 2008, Michael Ellerman, IBM Corporation.
7 */
8

--- 8 unchanged lines hidden (view full) ---

17 * "b" == create_branch(addr, target, 0);
18 * "ba" == create_branch(addr, target, BRANCH_ABSOLUTE);
19 * "bl" == create_branch(addr, target, BRANCH_SET_LINK);
20 * "bla" == create_branch(addr, target, BRANCH_ABSOLUTE | BRANCH_SET_LINK);
21 */
22#define BRANCH_SET_LINK 0x1
23#define BRANCH_ABSOLUTE 0x2
24
25DECLARE_STATIC_KEY_FALSE(init_mem_is_free);
26
25bool is_offset_in_branch_range(long offset);
26bool is_offset_in_cond_branch_range(long offset);
27int create_branch(ppc_inst_t *instr, const u32 *addr,
28 unsigned long target, int flags);
29int create_cond_branch(ppc_inst_t *instr, const u32 *addr,
30 unsigned long target, int flags);
31int patch_branch(u32 *addr, unsigned long target, int flags);
32int patch_instruction(u32 *addr, ppc_inst_t instr);

--- 164 unchanged lines hidden ---
27bool is_offset_in_branch_range(long offset);
28bool is_offset_in_cond_branch_range(long offset);
29int create_branch(ppc_inst_t *instr, const u32 *addr,
30 unsigned long target, int flags);
31int create_cond_branch(ppc_inst_t *instr, const u32 *addr,
32 unsigned long target, int flags);
33int patch_branch(u32 *addr, unsigned long target, int flags);
34int patch_instruction(u32 *addr, ppc_inst_t instr);

--- 164 unchanged lines hidden ---