linux/arch/powerpc/kernel
David Woodhouse 401d1f029b [PATCH] syscall entry/exit revamp
This cleanup patch speeds up the null syscall path on ppc64 by about 3%,
and brings the ppc32 and ppc64 code slightly closer together.

The ppc64 code was checking current_thread_info()->flags twice in the
syscall exit path; once for TIF_SYSCALL_T_OR_A before disabling
interrupts, and then again for TIF_SIGPENDING|TIF_NEED_RESCHED etc after
disabling interrupts. Now we do the same as ppc32 -- check the flags
only once in the fast path, and re-enable interrupts if necessary in the
ptrace case.

The patch abolishes the 'syscall_noerror' member of struct thread_info
and replaces it with a TIF_NOERROR bit in the flags, which is handled in
the slow path. This shortens the syscall entry code, which no longer
needs to clear syscall_noerror.

The patch adds a TIF_SAVE_NVGPRS flag which causes the syscall exit slow
path to save the non-volatile GPRs into a signal frame. This removes the
need for the assembly wrappers around sys_sigsuspend(),
sys_rt_sigsuspend(), et al which existed solely to save those registers
in advance. It also means I don't have to add new wrappers for ppoll()
and pselect(), which is what I was supposed to be doing when I got
distracted into this...

Finally, it unifies the ppc64 and ppc32 methods of handling syscall exit
directly into a signal handler (as required by sigsuspend et al) by
introducing a TIF_RESTOREALL flag which causes _all_ the registers to be
reloaded from the pt_regs by taking the ret_from_exception path, instead
of the normal syscall exit path which stomps on the callee-saved GPRs.

It appears to pass an LTP test run on ppc64, and passes basic testing on
ppc32 too. Brief tests of ptrace functionality with strace and gdb also
appear OK. I wouldn't send it to Linus for 2.6.15 just yet though :)

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09 14:49:01 +11:00
..
vdso32 [PATCH] powerpc: Make the vDSO functions set error code (#2) 2005-11-16 14:05:11 +11:00
vdso64 [PATCH] powerpc: Make the vDSO functions set error code (#2) 2005-11-16 14:05:11 +11:00
align.c [PATCH] powerpc: merge align.c 2005-11-18 14:39:23 +11:00
asm-offsets.c [PATCH] syscall entry/exit revamp 2006-01-09 14:49:01 +11:00
binfmt_elf32.c
btext.c
cpu_setup_power4.S [PATCH] powerpc: Move various ppc64 files with no ppc32 equivalent to powerpc 2005-11-10 11:24:04 +11:00
cputable.c powerpc: Add user CPU features for POWER4, POWER5, POWER5+ and Cell. 2005-11-10 14:29:18 +11:00
dma_64.c powerpc: Move most remaining ppc64 files over to arch/powerpc 2005-11-14 17:30:17 +11:00
entry_32.S [PATCH] syscall entry/exit revamp 2006-01-09 14:49:01 +11:00
entry_64.S [PATCH] syscall entry/exit revamp 2006-01-09 14:49:01 +11:00
firmware.c [PATCH] powerpc: Move various ppc64 files with no ppc32 equivalent to powerpc 2005-11-10 11:24:04 +11:00
fpu.S [PATCH] powerpc: Consolidate asm compatibility macros 2005-11-10 13:10:38 +11:00
head_4xx.S
head_8xx.S
head_32.S powerpc: Initialize secondary CPU setup for 32-bit SMP 2005-11-11 22:34:43 +11:00
head_44x.S
head_64.S [PATCH] powerpc: merge code values for identifying platforms 2005-11-10 13:37:51 +11:00
head_fsl_booke.S [PATCH] Update email address for Kumar 2005-11-13 18:14:10 -08:00
idle_6xx.S
idle_64.c powerpc: Move remaining .c files from arch/ppc64 to arch/powerpc 2005-11-18 15:43:34 +11:00
idle_power4.S
init_task.c
ioctl32.c [SPARC]: Fix RTC compat ioctl kernel log spam. 2005-11-12 12:10:54 -08:00
iomap.c powerpc: Move most remaining ppc64 files over to arch/powerpc 2005-11-14 17:30:17 +11:00
iommu.c powerpc: Move most remaining ppc64 files over to arch/powerpc 2005-11-14 17:30:17 +11:00
irq.c powerpc: have only one definition of __irq_offset_value 2005-11-14 14:44:33 +11:00
kprobes.c [PATCH] kprobes: increment kprobe missed count for multiprobes 2005-12-12 08:57:45 -08:00
lparcfg.c powerpc: iSeries build fixes 2005-11-14 17:14:51 +11:00
lparmap.c [PATCH] ppc64: support 64k pages 2005-11-06 16:56:47 -08:00
machine_kexec_32.c [PATCH] powerpc: Merge kexec 2006-01-09 14:48:52 +11:00
machine_kexec_64.c [PATCH] powerpc: Merge kexec 2006-01-09 14:48:52 +11:00
machine_kexec.c [PATCH] powerpc: Merge kexec 2006-01-09 14:48:52 +11:00
Makefile [PATCH] powerpc: Merge kexec 2006-01-09 14:48:52 +11:00
misc_32.S [PATCH] powerpc: Merge kexec 2006-01-09 14:48:52 +11:00
misc_64.S ppc64: remove ppc_irq_dispatch_handler 2005-11-09 16:19:53 +11:00
module_64.c powerpc: Move most remaining ppc64 files over to arch/powerpc 2005-11-14 17:30:17 +11:00
nvram_64.c powerpc: Move remaining .c files from arch/ppc64 to arch/powerpc 2005-11-18 15:43:34 +11:00
of_device.c
paca.c [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel 2005-11-11 22:25:39 +11:00
pci_64.c powerpc: Merge pci.h 2005-11-19 20:46:04 +11:00
pci_direct_iommu.c powerpc: Move most remaining ppc64 files over to arch/powerpc 2005-11-14 17:30:17 +11:00
pci_dn.c powerpc: Move most remaining ppc64 files over to arch/powerpc 2005-11-14 17:30:17 +11:00
pci_iommu.c powerpc: Move most remaining ppc64 files over to arch/powerpc 2005-11-14 17:30:17 +11:00
pmc.c
ppc32.h powerpc: move include/asm-ppc64/ppc32.h to arch/powerpc/kernel 2005-11-03 16:03:28 +11:00
ppc_ksyms.c [PATCH] PPC_PREP: remove unneeded exports 2006-01-09 14:48:47 +11:00
proc_ppc64.c [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel 2005-11-11 22:25:39 +11:00
process.c powerpc: Fix bug causing FP registers corruption on UP + preempt 2005-11-30 13:20:54 +11:00
prom_init.c [PATCH] powerpc: prevent stack corruption in call_prom_ret 2005-11-30 13:55:59 +11:00
prom.c powerpc: Export a couple of prom functions 2005-11-14 17:30:40 +11:00
ptrace32.c powerpc: move include/asm-ppc64/ptrace-common.h to arch/powerpc/kernel 2005-11-19 20:47:22 +11:00
ptrace-common.h powerpc: move include/asm-ppc64/ptrace-common.h to arch/powerpc/kernel 2005-11-19 20:47:22 +11:00
ptrace.c powerpc: move include/asm-ppc64/ptrace-common.h to arch/powerpc/kernel 2005-11-19 20:47:22 +11:00
rtas_flash.c
rtas_pci.c [PATCH] powerpc: pci_64 fixes & cleanups 2005-11-16 13:29:46 +11:00
rtas-proc.c [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel 2005-11-11 22:25:39 +11:00
rtas-rtc.c powerpc: time-of-day fixes for 32-bit CHRP systems 2005-11-18 15:52:38 +11:00
rtas.c [PATCH] powerpc: merge code values for identifying platforms 2005-11-10 13:37:51 +11:00
semaphore.c
setup_32.c powerpc: have only one definition of __irq_offset_value 2005-11-14 14:44:33 +11:00
setup_64.c [PATCH] powerpc: Set cache info defaults 2005-12-09 15:42:52 +11:00
setup-common.c [PATCH] powerpc: Merge kexec 2006-01-09 14:48:52 +11:00
setup.h powerpc: create kernel/setup.h 2005-11-09 11:35:26 +11:00
signal_32.c [PATCH] syscall entry/exit revamp 2006-01-09 14:49:01 +11:00
signal_64.c [PATCH] syscall entry/exit revamp 2006-01-09 14:49:01 +11:00
smp-tbsync.c powerpc: Merge smp-tbsync.c (the generic timebase sync routine) 2005-11-04 13:28:58 +11:00
smp.c [PATCH] powerpc: More debugging fixups 2005-11-16 13:29:40 +11:00
sys_ppc32.c [PATCH] powerpc: merge code values for identifying platforms 2005-11-10 13:37:51 +11:00
syscalls.c [PATCH] arch/powerpc/kernel/syscalls.c __user annotations 2005-12-15 10:04:31 -08:00
sysfs.c [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel 2005-11-11 22:25:39 +11:00
systbl.S [PATCH] syscall entry/exit revamp 2006-01-09 14:49:01 +11:00
time.c powerpc: Fix delay functions for 601 processors 2005-11-18 14:08:12 +11:00
traps.c [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel 2005-11-11 22:25:39 +11:00
udbg_16550.c [PATCH] powerpc: Move udbg code to arch/powerpc 2005-11-11 22:23:34 +11:00
udbg_scc.c [PATCH] powerpc: Move udbg code to arch/powerpc 2005-11-11 22:23:34 +11:00
udbg.c [PATCH] powerpc: Move udbg code to arch/powerpc 2005-11-11 22:23:34 +11:00
vdso.c mm: re-architect the VM_UNPAGED logic 2005-11-28 14:34:23 -08:00
vecemu.c
vector.S
vio.c [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
vmlinux.lds.S powerpc: Fix vmlinux.lds.S for 32-bit 2005-11-05 10:36:59 +11:00