[Linux-ia64] [Patch] Fix in process.c

From: Siddha, Suresh B <suresh.b.siddha_at_intel.com>
Date: 2003-01-18 12:43:44
Attached/appended fix for another problem(getting the address of a function), which depends on the compiler behaviour.

thanks,
suresh

diff -Nru linux-2.5.52/arch/ia64/kernel/process.c~ linux-2.5.52/arch/ia64/kernel/process.c
--- linux-2.5.52/arch/ia64/kernel/process.c~	Fri Jan 17 14:53:52 2003
+++ linux-2.5.52/arch/ia64/kernel/process.c	Fri Jan 17 15:27:46 2003
@@ -281,7 +281,10 @@
 {
 	unsigned long rbs, child_rbs, rbs_size, stack_offset, stack_top, stack_used;
 	struct switch_stack *child_stack, *stack;
-	extern char ia64_ret_from_clone, ia32_ret_from_clone;
+	extern void  ia64_ret_from_clone(void);
+#ifdef CONFIG_IA32_SUPPORT
+	extern void ia32_ret_from_clone(void);
+#endif
 	struct pt_regs *child_ptregs;
 	int retval = 0;
 
@@ -332,10 +335,13 @@
 		child_ptregs->r12 = (unsigned long) (child_ptregs + 1); /* kernel sp */
 		child_ptregs->r13 = (unsigned long) p;		/* set `current' pointer */
 	}
+#ifdef CONFIG_IA32_SUPPORT
 	if (IS_IA32_PROCESS(regs))
-		child_stack->b0 = (unsigned long) &ia32_ret_from_clone;
+		child_stack->b0 = ((unsigned long *) &ia32_ret_from_clone)[0];
 	else
-		child_stack->b0 = (unsigned long) &ia64_ret_from_clone;
+#else
+		child_stack->b0 = ((unsigned long *) &ia64_ret_from_clone)[0];
+#endif
 	child_stack->ar_bspstore = child_rbs + rbs_size;
 
 	/* copy parts of thread_struct: */



Received on Fri Jan 17 17:43:46 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:11 EST