From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] [Patch] Fix in process.c
Date: Sat, 18 Jan 2003 01:43:44 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805720@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]
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: */
[-- Attachment #2: process.c.diff --]
[-- Type: application/octet-stream, Size: 1226 bytes --]
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: */
next reply other threads:[~2003-01-18 1:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-18 1:43 Siddha, Suresh B [this message]
2003-01-18 1:53 ` [Linux-ia64] [Patch] Fix in process.c David Mosberger
2003-01-18 3:04 ` Siddha, Suresh B
2003-01-18 3:11 ` David Mosberger
2003-01-18 3:39 ` Siddha, Suresh B
2003-01-21 2:41 ` Siddha, Suresh B
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105590709805720@msgid-missing \
--to=suresh.b.siddha@intel.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.