diff options
author | 2018-09-26 15:54:31 +0200 | |
---|---|---|
committer | 2018-09-26 15:54:31 +0200 | |
commit | aaccf3c97418f169afdbb5855e9cbcbda34e90fd (patch) | |
tree | 5d4207e67958bdbc23288cf30178692f5534e1a0 /arch/powerpc/lib/code-patching.c | |
parent | Documentation/fb: corrections for fbcon.txt (diff) | |
parent | Linux 4.19-rc5 (diff) | |
download | wireguard-linux-aaccf3c97418f169afdbb5855e9cbcbda34e90fd.tar.xz wireguard-linux-aaccf3c97418f169afdbb5855e9cbcbda34e90fd.zip |
Merge tag 'v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Sync with upstream (which now contains fbdev-v4.19 changes) to
prepare a base for fbdev-v4.20 changes.
Diffstat (limited to '')
-rw-r--r-- | arch/powerpc/lib/code-patching.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c index e0d881ab304e..850f3b8f4da5 100644 --- a/arch/powerpc/lib/code-patching.c +++ b/arch/powerpc/lib/code-patching.c @@ -195,6 +195,22 @@ int patch_branch(unsigned int *addr, unsigned long target, int flags) return patch_instruction(addr, create_branch(addr, target, flags)); } +int patch_branch_site(s32 *site, unsigned long target, int flags) +{ + unsigned int *addr; + + addr = (unsigned int *)((unsigned long)site + *site); + return patch_instruction(addr, create_branch(addr, target, flags)); +} + +int patch_instruction_site(s32 *site, unsigned int instr) +{ + unsigned int *addr; + + addr = (unsigned int *)((unsigned long)site + *site); + return patch_instruction(addr, instr); +} + bool is_offset_in_branch_range(long offset) { /* |