Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
411781a
Documentation
arch
block
crypto
drivers
fs
include
acpi
asm-alpha
asm-arm
asm-avr32
asm-blackfin
asm-cris
asm-frv
asm-generic
asm-h8300
asm-ia64
asm-m32r
asm-m68k
asm-m68knommu
asm-mips
asm-mn10300
asm-parisc
asm-powerpc
iseries
8253pit.h
8xx_immap.h
Kbuild
a.out.h
abs_addr.h
agp.h
asm-compat.h
atomic.h
auxvec.h
backlight.h
bitops.h
bootx.h
btext.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
cell-pmu.h
cell-regs.h
checksum.h
clk_interface.h
code-patching.h
compat.h
cpm.h
cpm1.h
cpm2.h
cputable.h
cputhreads.h
cputime.h
current.h
dbdma.h
dcr-generic.h
dcr-mmio.h
dcr-native.h
dcr-regs.h
dcr.h
delay.h
device.h
div64.h
dma-mapping.h
dma.h
edac.h
eeh.h
eeh_event.h
elf.h
emergency-restart.h
errno.h
exception.h
fb.h
fcntl.h
firmware.h
fixmap.h
floppy.h
fs_pd.h
fsl_gtm.h
fsl_lbc.h
futex.h
gpio.h
grackle.h
hardirq.h
heathrow.h
highmem.h
hugetlb.h
hvcall.h
hvconsole.h
hvcserver.h
hw_irq.h
hydra.h
i8259.h
ibmebus.h
ide.h
immap_86xx.h
immap_cpm2.h
immap_qe.h
io-defs.h
io.h
ioctl.h
ioctls.h
iommu.h
ipcbuf.h
ipic.h
irq.h
irq_regs.h
irqflags.h
kdebug.h
kdump.h
kexec.h
keylargo.h
kgdb.h
kmap_types.h
kprobes.h
kvm.h
kvm_asm.h
kvm_host.h
kvm_para.h
kvm_ppc.h
libata-portmap.h
linkage.h
lmb.h
local.h
lppaca.h
lv1call.h
machdep.h
macio.h
mc146818rtc.h
mediabay.h
mman.h
mmu-40x.h
mmu-44x.h
mmu-8xx.h
mmu-fsl-booke.h
mmu-hash32.h
mmu-hash64.h
mmu.h
mmu_context.h
mmzone.h
module.h
mpc512x.h
mpc52xx.h
mpc52xx_psc.h
mpc6xx.h
mpc8260.h
mpc86xx.h
mpc8xx.h
mpic.h
msgbuf.h
mutex.h
namei.h
nvram.h
of_device.h
of_platform.h
ohare.h
oprofile_impl.h
pSeries_reconfig.h
paca.h
page.h
page_32.h
page_64.h
param.h
parport.h
pasemi_dma.h
pci-bridge.h
pci.h
percpu.h
pgalloc-32.h
pgalloc-64.h
pgalloc.h
pgtable-4k.h
pgtable-64k.h
pgtable-ppc32.h
pgtable-ppc64.h
pgtable.h
phyp_dump.h
pmac_feature.h
pmac_low_i2c.h
pmac_pfunc.h
pmc.h
pmi.h
poll.h
posix_types.h
ppc-pci.h
ppc4xx.h
ppc_asm.h
processor.h
prom.h
ps3.h
ps3av.h
ps3fb.h
ps3stor.h
ptrace.h
qe.h
qe_ic.h
reg.h
reg_8xx.h
reg_booke.h
reg_fsl_emb.h
resource.h
rheap.h
rio.h
rtas.h
rtc.h
rwsem.h
scatterlist.h
seccomp.h
sections.h
semaphore.h
sembuf.h
serial.h
setjmp.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h
smu.h
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
spu.h
spu_csa.h
spu_info.h
spu_priv1.h
sstep.h
stat.h
statfs.h
string.h
suspend.h
synch.h
syscalls.h
systbl.h
system.h
tce.h
termbits.h
termios.h
thread_info.h
time.h
timex.h
tlb.h
tlbflush.h
topology.h
tsi108.h
tsi108_irq.h
tsi108_pci.h
types.h
uaccess.h
ucc.h
ucc_fast.h
ucc_slow.h
ucontext.h
udbg.h
uic.h
unaligned.h
uninorth.h
unistd.h
user.h
vdso.h
vdso_datapage.h
vga.h
vio.h
xilinx_intc.h
xmon.h
xor.h
asm-s390
asm-sh
asm-sparc
asm-sparc64
asm-um
asm-v850
asm-x86
asm-xtensa
crypto
keys
linux
math-emu
media
mtd
net
pcmcia
rdma
rxrpc
scsi
sound
video
xen
Kbuild
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
include
/
asm-powerpc
/
code-patching.h
Blame
Blame
Latest commit
History
History
51 lines (44 loc) · 1.68 KB
Breadcrumbs
linux
/
include
/
asm-powerpc
/
code-patching.h
Top
File metadata and controls
Code
Blame
51 lines (44 loc) · 1.68 KB
Raw
#ifndef _ASM_POWERPC_CODE_PATCHING_H #define _ASM_POWERPC_CODE_PATCHING_H /* * Copyright 2008, Michael Ellerman, IBM Corporation. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include <asm/types.h> /* Flags for create_branch: * "b" == create_branch(addr, target, 0); * "ba" == create_branch(addr, target, BRANCH_ABSOLUTE); * "bl" == create_branch(addr, target, BRANCH_SET_LINK); * "bla" == create_branch(addr, target, BRANCH_ABSOLUTE | BRANCH_SET_LINK); */ #define BRANCH_SET_LINK 0x1 #define BRANCH_ABSOLUTE 0x2 unsigned int create_branch(const unsigned int *addr, unsigned long target, int flags); unsigned int create_cond_branch(const unsigned int *addr, unsigned long target, int flags); void patch_branch(unsigned int *addr, unsigned long target, int flags); void patch_instruction(unsigned int *addr, unsigned int instr); int instr_is_relative_branch(unsigned int instr); int instr_is_branch_to_addr(const unsigned int *instr, unsigned long addr); unsigned long branch_target(const unsigned int *instr); unsigned int translate_branch(const unsigned int *dest, const unsigned int *src); static inline unsigned long ppc_function_entry(void *func) { #ifdef CONFIG_PPC64 /* * On PPC64 the function pointer actually points to the function's * descriptor. The first entry in the descriptor is the address * of the function text. */ return ((func_descr_t *)func)->entry; #else return (unsigned long)func; #endif } #endif /* _ASM_POWERPC_CODE_PATCHING_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
You can’t perform that action at this time.