diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-10-13 13:40:54 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-10-13 13:40:54 +1000 |
commit | d4bf9a7858a0766cafb21dcb66ff9a5d92c1cd09 (patch) | |
tree | 7179d40fa2b016414fb2b7fcc9e9da960459bc8d /arch/powerpc/kernel/process.c | |
parent | 0f17d0742f27b7a69b0e2dfb21190f06ea3a9087 (diff) | |
download | kernel-crypto-d4bf9a7858a0766cafb21dcb66ff9a5d92c1cd09.tar.gz kernel-crypto-d4bf9a7858a0766cafb21dcb66ff9a5d92c1cd09.tar.xz kernel-crypto-d4bf9a7858a0766cafb21dcb66ff9a5d92c1cd09.zip |
ppc64: merge binfmt_elf32.c
and use start_thread for both 32 and 64 bit bineries.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 92bc75f61ca..193c8c1bf13 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -620,7 +620,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) regs->nip = start; regs->msr = MSR_USER; #else - { + if (!test_thread_flag(TIF_32BIT)) { unsigned long entry, toc, load_addr = regs->gpr[2]; /* start is a relocated pointer to the function descriptor for @@ -641,6 +641,10 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) regs->nip = entry; regs->gpr[2] = toc; regs->msr = MSR_USER64; + } else { + regs->nip = start; + regs->gpr[2] = 0; + regs->msr = MSR_USER32; } #endif |