android_kernel_xiaomi_sm8350/include/asm-powerpc
Benjamin Herrenschmidt e17666ba48 [POWERPC] ptrace updates & new, better requests
The powerpc ptrace interface is dodgy at best. We have defined our
"own" versions of GETREGS/SETREGS/GETFPREGS/SETFPREGS that strangely
take arguments in reverse order from other archs (in addition to having
different request numbers) and have subtle issue, like not accessing
all of the registers in their respective categories.

This patch moves the implementation of those to a separate function
in order to facilitate their deprecation in the future, and provides
new ptrace requests that mirror the x86 and sparc ones and use the
same numbers:

   PTRACE_GETREGS    : returns an entire pt_regs (the whole thing,
                       not only the 32 GPRs, though that doesn't
                       include the FPRs etc... There's a compat version
                       for 32 bits that returns a 32 bits compatible
                       pt_regs (44 uints)

   PTRACE_SETREGS    : sets an entire pt_regs (the whole thing,
                       not only the 32 GPRs, though that doesn't
                       include the FPRs etc... Some registers cannot be
                       written to and will just be dropped, this is the
                       same as with POKEUSR, that is anything above MQ
                       on 32 bits and CCR on 64 bits. There is a compat
                       version as well.

   PTRACE_GETFPREGS  : returns all the FP registers -including- the FPSCR
                       that is 33 doubles (regardless of 32/64 bits)

   PTRACE_SETFPREGS  : sets all the FP registers -including- the FPSCR
                       that is 33 doubles (regardless of 32/64 bits)

And two that only exist on 64 bits kernels:

   PTRACE_GETREGS64  : Same as PTRACE_GETREGS, except there is no compat
                       function, a 32 bits process will obtain the full 64
                       bits registers

   PTRACE_SETREGS64  : Same as PTRACE_SETREGS, except there is no compat
                       function, a 32 bits process will set the full 64
                       bits registers

The two later ones makes things easier to have a 32 bits debugger on a
64 bits program (or on a 32 bits program that uses the full 64 bits of
the GPRs, which is possible though has issues that will be fixed in a
later patch).

Finally, while at it, the patch removes a whole bunch of code duplication
between ptrace32.c and ptrace.c, in large part by having the former call
into the later for all requests that don't need any special "compat"
treatment.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-14 22:29:56 +10:00
..
iseries [POWERPC] Refactor 64 bits DMA operations 2006-12-04 20:38:40 +11:00
8253pit.h
a.out.h
abs_addr.h
agp.h
asm-compat.h [POWERPC] Use mtocrf instruction in asm when CONFIG_POWER4_ONLY=y 2007-04-13 03:55:13 +10:00
atomic.h atomic.h: atomic_add_unless as inline. Remove system.h atomic.h circular dependency 2007-05-08 11:15:20 -07:00
auxvec.h
backlight.h [PATCH] powermac: More powermac backlight fixes 2006-07-31 13:28:45 -07:00
bitops.h atomic.h: add atomic64 cmpxchg, xchg and add_unless to powerpc 2007-05-08 11:15:19 -07:00
bootx.h
btext.h
bug.h [POWERPC] Fix manual assembly WARN_ON() in enter_rtas(). 2007-01-09 17:03:02 +11:00
bugs.h
byteorder.h
cache.h
cacheflush.h [POWERPC] DEBUG_PAGEALLOC for 32-bit 2007-04-13 04:09:39 +10:00
cell-pmu.h [POWERPC] cell: add cbe_node_to_cpu function 2007-04-23 21:44:38 +02:00
checksum.h [NET]: POWERPC checksum annotations and cleanups. 2006-12-02 21:23:20 -08:00
compat.h
cputable.h [POWERPC] Remove CPU_FTR_NEED_COHERENT for 7448. 2007-05-17 21:10:15 +10:00
cputime.h [PATCH] powerpc: implement missing jiffies64_to_cputime64() 2006-07-05 09:39:54 -07:00
current.h [POWERPC] Include stddef.h in asm-powerpc/current.h to get offsetof 2007-03-09 15:03:24 +11:00
dbdma.h [POWERPC] Xserve cpu-meter driver 2006-12-04 20:39:30 +11:00
dcr-mmio.h [POWERPC] Generic DCR infrastructure 2006-12-04 16:08:25 +11:00
dcr-native.h [POWERPC] More DCR native fixups 2007-02-16 14:00:19 +11:00
dcr.h [POWERPC] Compile fixes for arch/powerpc dcr code 2007-02-07 14:03:23 +11:00
delay.h
device.h [POWERPC] Refactor 64 bits DMA operations 2006-12-04 20:38:40 +11:00
div64.h
dma-mapping.h [PATCH] dma-mapping.h stubs fix 2007-01-30 08:39:21 -08:00
dma.h
edac.h [POWERPC] EDAC ECC software scrubber 2007-03-09 15:03:25 +11:00
eeh_event.h [POWERPC] EEH: rm un-needed data 2007-03-22 22:52:55 +11:00
eeh.h [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h 2006-12-04 20:39:05 +11:00
elf.h [POWERPC] Move ELF_ET_DYN_BASE up to 512MB point 2007-01-24 21:13:56 +11:00
emergency-restart.h
errno.h
fcntl.h
firmware.h [POWERPC] Only use H_BULK_REMOVE if the firmware supports it 2007-02-08 15:02:35 +11:00
floppy.h [POWERPC] Rewrite IO allocation & mapping on powerpc64 2007-06-14 22:29:56 +10:00
fs_pd.h [POWERPC] Fix kernel build errors for mpc8272ads and mpc8560ads 2007-02-07 14:03:20 +11:00
futex.h [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
grackle.h
hardirq.h
heathrow.h
hvcall.h [POWERPC] Avoid hypervisor statistics calculation in real mode 2007-03-22 15:01:43 +11:00
hvconsole.h
hvcserver.h
hw_irq.h powerpc: fixup hard_irq_disable semantics 2007-05-11 08:29:34 -07:00
i8259.h [POWERPC] Fix CHRP platforms with only 8259 2006-10-25 13:49:22 +10:00
ibmebus.h [POWERPC] ibmebus: dynamic addition/removal of adapters, some code cleanup 2007-03-16 16:38:19 +11:00
ide.h [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h 2006-12-04 20:39:05 +11:00
immap_86xx.h [POWERPC] 86xx/85xx: Unify Freescale PCI Express memory map registers structure 2007-03-26 17:03:49 -05:00
immap_qe.h [POWERPC] qe: ucc_slow.guemr is in the wrong place 2007-03-29 14:33:56 -05:00
io-defs.h [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h 2006-12-04 20:39:05 +11:00
io.h [POWERPC] Rewrite IO allocation & mapping on powerpc64 2007-06-14 22:29:56 +10:00
ioctl.h
ioctls.h
iommu.h [POWERPC] DART iommu suspend 2007-05-07 20:31:14 +10:00
ipc.h
ipcbuf.h
ipic.h [POWERPC] 83xx: Return a point to the struct ipic from ipic_init() 2007-01-26 01:45:32 -06:00
irq_regs.h IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
irq.h [POWERPC] Add IRQ remapping hook 2007-01-24 21:13:59 +11:00
irqflags.h [PATCH] lockdep: irqtrace subsystem, core 2006-07-03 15:27:03 -07:00
Kbuild [PATCH] ps3: Virtual Frame Buffer Driver 2007-02-12 09:48:44 -08:00
kdebug.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-08 11:50:19 -07:00
kdump.h [POWERPC] kdump: Support kernels having 64k page size. 2006-09-13 18:30:04 +10:00
kexec.h kdump/kexec: calculate note size at compile time 2007-05-08 11:15:07 -07:00
keylargo.h
kmap_types.h
kprobes.h [POWERPC] Minor fault path optimization 2007-05-02 20:57:39 +10:00
libata-portmap.h Fix Maple PATA IRQ assignment. 2007-01-26 17:27:40 -05:00
linkage.h
lmb.h
local.h local_t: powerpc extension 2007-05-08 11:15:20 -07:00
lppaca.h [POWERPC] Update lppaca offset comments 2006-08-08 17:08:58 +10:00
lv1call.h [POWERPC] ps3: add lv1 hvcalls 2006-12-04 20:40:44 +11:00
machdep.h [POWERPC] PowerPC MSI infrastructure 2007-05-08 13:40:31 +10:00
macio.h
mc146818rtc.h
mediabay.h
mman.h
mmu_context.h Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
mmu-44x.h [POWERPC] Remove fixup_bigphys_addr() for arch/powerpc to avoid link error 2007-05-17 21:11:13 +10:00
mmu-hash64.h [POWERPC] Fix warning in hpte_decode(), and generalize it 2007-05-10 21:28:13 +10:00
mmu.h [POWERPC] Revise PPC44x MMU code for arch/powerpc 2007-05-02 20:04:29 +10:00
mmzone.h [POWERPC] We don't define CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID 2007-05-10 21:28:13 +10:00
module.h [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00
mpc8xx.h [POWERPC] Add mpc866ads board-specific bits to arch/powerpc 2007-02-07 14:03:17 +11:00
mpc52xx.h [POWERPC] mpc52xx suspend to deep-sleep 2007-05-07 20:31:15 +10:00
mpc85xx.h [PATCH] ppc: Fix io.h for config with CONFIG_PCI not set 2006-11-13 14:49:25 +11:00
mpc86xx.h [POWERPC] Use mpc8641hpcn PIC base address from dev tree. 2006-08-25 14:32:13 +10:00
mpc8260.h [POWERPC] Change include protections to ASM_POWERPC 2007-05-17 21:10:15 +10:00
mpic.h [POWERPC] MPIC MSI allocator 2007-05-08 13:43:48 +10:00
msgbuf.h
mutex.h
namei.h
nvram.h
of_device.h [POWERPC] Export of_device_get_modalias 2007-05-07 20:31:15 +10:00
of_platform.h [POWERPC] Souped-up of_platform_device support 2006-12-04 16:08:52 +11:00
ohare.h
oprofile_impl.h [POWERPC] pasemi: PA6T oprofile support 2007-04-24 21:31:51 +10:00
paca.h [POWERPC] Introduce address space "slices" 2007-05-09 16:35:00 +10:00
page_32.h [POWERPC] Kill off the PTE_FMT macro 2007-05-07 20:31:14 +10:00
page_64.h [POWERPC] Introduce address space "slices" 2007-05-09 16:35:00 +10:00
page.h [POWERPC] Remove use of 4level-fixup.h for ppc32 2007-05-08 13:40:31 +10:00
param.h
parport.h parport->dev driver model support 2007-05-08 11:15:05 -07:00
pci-bridge.h [POWERPC] Rewrite IO allocation & mapping on powerpc64 2007-06-14 22:29:56 +10:00
pci.h [POWERPC] Rewrite IO allocation & mapping on powerpc64 2007-06-14 22:29:56 +10:00
percpu.h [PATCH] lockdep: add per_cpu_offset() 2006-07-03 15:27:00 -07:00
pgalloc-32.h [POWERPC] Remove use of 4level-fixup.h for ppc32 2007-05-08 13:40:31 +10:00
pgalloc-64.h [POWERPC] Fix return from pte_alloc_one() in out-of-memory case 2007-06-02 21:01:56 +10:00
pgalloc.h [POWERPC] Remove arch/powerpc's dependence on asm-ppc/pg{alloc,table}.h 2007-05-02 20:04:30 +10:00
pgtable-4k.h [POWERPC] Add ability to 4K kernel to hash in 64K pages 2007-05-09 16:35:00 +10:00
pgtable-64k.h [POWERPC] Add ability to 4K kernel to hash in 64K pages 2007-05-09 16:35:00 +10:00
pgtable-ppc32.h [POWERPC] Remove fixup_bigphys_addr() for arch/powerpc to avoid link error 2007-05-17 21:11:13 +10:00
pgtable-ppc64.h [POWERPC] Rewrite IO allocation & mapping on powerpc64 2007-06-14 22:29:56 +10:00
pgtable.h [POWERPC] Remove arch/powerpc's dependence on asm-ppc/pg{alloc,table}.h 2007-05-02 20:04:30 +10:00
pmac_feature.h [POWERPC] Change include protections to ASM_POWERPC 2007-05-17 21:10:15 +10:00
pmac_low_i2c.h
pmac_pfunc.h
pmc.h [POWERPC] pasemi: PA6T oprofile support 2007-04-24 21:31:51 +10:00
pmi.h [POWERPC] Add PMI driver for cell blade 2007-02-16 14:00:19 +11:00
poll.h Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
posix_types.h [PATCH] FD_ZERO build fix 2007-01-11 18:18:22 -08:00
ppc_asm.h [POWERPC] Cell timebase bug workaround 2006-10-25 11:54:18 +10:00
ppc-pci.h [POWERPC] Rewrite IO allocation & mapping on powerpc64 2007-06-14 22:29:56 +10:00
processor.h [POWERPC] Remove last_syscall 2007-03-22 22:52:58 +11:00
prom.h [POWERPC] Uninline of_iomap function 2007-05-02 20:04:29 +10:00
ps3.h [POWERPC] PS3: Fix sys manager build error 2007-05-10 21:28:13 +10:00
ps3av.h ps3: Make `ps3videomode -v 0 (auto mode) work again 2007-05-04 17:59:08 -07:00
ps3fb.h [PATCH] ps3: cleanup ps3fb before clearing HPTE 2007-02-12 09:48:44 -08:00
pSeries_reconfig.h
ptrace.h [POWERPC] ptrace updates & new, better requests 2007-06-14 22:29:56 +10:00
qe_ic.h [POWERPC] Add QUICC Engine (QE) infrastructure 2006-10-04 15:24:27 +10:00
qe.h [POWERPC] Change rheap functions to use ulongs instead of pointers 2007-05-09 23:01:43 -05:00
reg_8xx.h
reg_booke.h [POWERPC] Move reg_booke.h to include/asm-powerpc 2007-05-09 23:00:37 -05:00
reg.h [POWERPC] pasemi: PA6T oprofile support 2007-04-24 21:31:51 +10:00
resource.h
rheap.h [POWERPC] User rheap from arch/powerpc/lib 2007-05-09 23:28:17 -05:00
rtas.h [POWERPC] Add rtas_service_present() helper 2006-12-08 17:10:22 +11:00
rtc.h
rwsem.h [PATCH] lockdep: remove RWSEM_DEBUG remnants 2006-07-03 15:27:01 -07:00
scatterlist.h
seccomp.h
sections.h
semaphore.h
sembuf.h
serial.h
setup.h [PATCH] cleanup asm/setup.h userspace visibility 2006-12-07 08:39:46 -08:00
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h [PATCH] irq-flags: POWERPC: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
smp.h Remove hardcoding of hard_smp_processor_id on UP systems 2007-05-09 12:30:48 -07:00
smu.h [POWERPC] powermac: Constify & voidify get_property() 2006-07-31 15:55:05 +10:00
socket.h [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
sockios.h [NET]: Introduce SIOCGSTAMPNS ioctl to get timestamps with nanosec resolution 2007-04-25 22:24:04 -07:00
sparsemem.h [POWERPC] ps3: add lpar addressing 2006-12-04 20:40:52 +11:00
spinlock_types.h
spinlock.h [PATCH] Directed yield: direct yield of spinlocks for powerpc 2006-10-01 00:39:22 -07:00
spu_csa.h [POWERPC] Spufs support for 64K LS mappings on 4K kernels 2007-05-09 16:35:00 +10:00
spu_info.h [POWERPC] spufs: Add /lslr, /dma_info and /proxydma files 2006-12-04 20:39:45 +11:00
spu_priv1.h [POWERPC] Celleb: consolidate spu management ops 2007-02-07 14:03:21 +11:00
spu.h [POWERPC] Fix spu SLB invalidations 2007-03-10 00:07:50 +01:00
sstep.h [POWERPC] Added kprobes support to ppc32 2007-02-06 22:55:19 -06:00
stat.h
statfs.h
string.h [STRING]: Move strcasecmp/strncasecmp to lib/string.c 2007-04-26 01:54:39 -07:00
suspend.h [POWERPC] Fix suspend states again 2007-05-02 20:04:30 +10:00
synch.h
syscalls.h
systbl.h [POWERPC] Wire up some more syscalls 2007-05-17 21:11:13 +10:00
system.h Remove tas() 2007-05-08 11:15:20 -07:00
tce.h [POWERPC] Use 4kB iommu pages even on 64kB-page systems 2006-11-01 14:52:48 +11:00
termbits.h [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
termios.h [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
thread_info.h [POWERPC] Reserve threadinfo flags for perfmon2 2007-06-14 22:29:55 +10:00
time.h [POWERPC] 8xx: powerpc port of core CPM PIC 2007-02-07 14:03:17 +11:00
timex.h [POWERPC] Cell timebase bug workaround 2006-10-25 11:54:18 +10:00
tlb.h [POWERPC] Fix possible access to free pages 2007-06-02 21:01:55 +10:00
tlbflush.h [POWERPC] Rewrite IO allocation & mapping on powerpc64 2007-06-14 22:29:56 +10:00
topology.h [PATCH] sched: remove SMT nice 2007-03-05 07:57:51 -08:00
tsi108_irq.h [POWERPC] Change include protections to ASM_POWERPC 2007-05-17 21:10:15 +10:00
tsi108_pci.h [POWERPC] Change include protections to ASM_POWERPC 2007-05-17 21:10:15 +10:00
tsi108.h [POWERPC] Generalize tsi108 PCI setup 2007-05-08 11:54:20 +10:00
types.h [PATCH] Centralise definitions of sector_t and blkcnt_t 2006-12-04 19:41:15 -08:00
uaccess.h [POWERPC] Add inatomic versions of __get_user and __put_user 2007-04-13 04:09:38 +10:00
ucc_fast.h ucc_geth: Implement Transmit on Demand support 2007-04-28 11:01:04 -04:00
ucc_slow.h [POWERPC] QE: clean up ucc_slow.c and ucc_fast.c 2007-02-17 16:12:54 -06:00
ucc.h [POWERPC] Add QUICC Engine (QE) infrastructure 2006-10-04 15:24:27 +10:00
ucontext.h
udbg.h [POWERPC] Early serial debug support for PPC44x 2007-05-08 14:47:33 +10:00
uic.h [POWERPC] Add arch/powerpc driver for UIC, PPC4xx interrupt controller 2007-04-24 21:32:01 +10:00
unaligned.h
uninorth.h
unistd.h [POWERPC] Wire up some more syscalls 2007-05-17 21:11:13 +10:00
user.h
vdso_datapage.h
vdso.h [POWERPC] Fix vDSO page count calculation 2007-02-13 15:35:52 +11:00
vga.h
vio.h [POWERPC] Refactor 64 bits DMA operations 2006-12-04 20:38:40 +11:00
xmon.h [POWERPC] add support for stopping spus from xmon 2006-10-25 14:20:22 +10:00
xor.h