Browse Source

powerpc: Use is_32bit_task() helper to test 32 bit binary

Use is_32bit_task() helper to test 32 bit binary.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Denis Kirjanov 15 years ago
parent
commit
9904b00593
1 changed files with 3 additions and 3 deletions
  1. 3 3
      arch/powerpc/kernel/process.c

+ 3 - 3
arch/powerpc/kernel/process.c

@@ -728,7 +728,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
 		p->thread.regs = childregs;
 		p->thread.regs = childregs;
 		if (clone_flags & CLONE_SETTLS) {
 		if (clone_flags & CLONE_SETTLS) {
 #ifdef CONFIG_PPC64
 #ifdef CONFIG_PPC64
-			if (!test_thread_flag(TIF_32BIT))
+			if (!is_32bit_task())
 				childregs->gpr[13] = childregs->gpr[6];
 				childregs->gpr[13] = childregs->gpr[6];
 			else
 			else
 #endif
 #endif
@@ -823,7 +823,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
 	regs->nip = start;
 	regs->nip = start;
 	regs->msr = MSR_USER;
 	regs->msr = MSR_USER;
 #else
 #else
-	if (!test_thread_flag(TIF_32BIT)) {
+	if (!is_32bit_task()) {
 		unsigned long entry, toc;
 		unsigned long entry, toc;
 
 
 		/* start is a relocated pointer to the function descriptor for
 		/* start is a relocated pointer to the function descriptor for
@@ -995,7 +995,7 @@ int sys_clone(unsigned long clone_flags, unsigned long usp,
 	if (usp == 0)
 	if (usp == 0)
 		usp = regs->gpr[1];	/* stack pointer for child */
 		usp = regs->gpr[1];	/* stack pointer for child */
 #ifdef CONFIG_PPC64
 #ifdef CONFIG_PPC64
-	if (test_thread_flag(TIF_32BIT)) {
+	if (is_32bit_task()) {
 		parent_tidp = TRUNC_PTR(parent_tidp);
 		parent_tidp = TRUNC_PTR(parent_tidp);
 		child_tidp = TRUNC_PTR(child_tidp);
 		child_tidp = TRUNC_PTR(child_tidp);
 	}
 	}