mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 07:34:06 +08:00
powerpc/code-patching: Add a helper to get the address of a patch_site
This patch adds a helper to get the address of a patch_site. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> [mpe: Call it "patch site" addr] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
cc4ebf5c0a
commit
082e2869fc
@ -36,6 +36,11 @@ int raw_patch_instruction(unsigned int *addr, unsigned int instr);
|
||||
int patch_instruction_site(s32 *addr, unsigned int instr);
|
||||
int patch_branch_site(s32 *site, unsigned long target, int flags);
|
||||
|
||||
static inline unsigned long patch_site_addr(s32 *site)
|
||||
{
|
||||
return (unsigned long)site + *site;
|
||||
}
|
||||
|
||||
int instr_is_relative_branch(unsigned int instr);
|
||||
int instr_is_relative_link_branch(unsigned int instr);
|
||||
int instr_is_branch_to_addr(const unsigned int *instr, unsigned long addr);
|
||||
|
Loading…
Reference in New Issue
Block a user