summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-10-03 07:33:17 +0200
committerPaul Mackerras <paulus@samba.org>2007-10-03 07:33:17 +0200
commit70f227d8846a8a9b1f36f71c42e11cc7c6e9408d (patch)
treefb4dd5c8240bdaada819fb569c01a392b52847b9 /arch/powerpc/kernel/process.c
parent[POWERPC] Fix panic in RTAS code (diff)
parentMerge branch 'sas-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarz... (diff)
downloadlinux-70f227d8846a8a9b1f36f71c42e11cc7c6e9408d.tar.xz
linux-70f227d8846a8a9b1f36f71c42e11cc7c6e9408d.zip
Merge branch 'linux-2.6' into for-2.6.24
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 588c0cb8115e..15998b57767c 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -613,6 +613,13 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
regs->ccr = 0;
regs->gpr[1] = sp;
+ /*
+ * We have just cleared all the nonvolatile GPRs, so make
+ * FULL_REGS(regs) return true. This is necessary to allow
+ * ptrace to examine the thread immediately after exec.
+ */
+ regs->trap &= ~1UL;
+
#ifdef CONFIG_PPC32
regs->mq = 0;
regs->nip = start;