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>
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 92bc75f..193c8c1 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -620,7 +620,7 @@
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 @@
regs->nip = entry;
regs->gpr[2] = toc;
regs->msr = MSR_USER64;
+ } else {
+ regs->nip = start;
+ regs->gpr[2] = 0;
+ regs->msr = MSR_USER32;
}
#endif