From: David Howells <dhowells@redhat.com>
To: akpm@osdl.org, davem@redhat.com, Arnd Bergmann <arnd@arndb.de>,
Jesse Barnes <jbarnes@sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix usage of setup_arg_pages() in IA64, MIPS, S390 and Sparc64
Date: Wed, 10 Nov 2004 11:24:19 +0000 [thread overview]
Message-ID: <2555.1100085859@redhat.com> (raw)
The attached patch fixes the usage of setup_arg_pages() in the IA64, MIPS,
S390 and Sparc64 arches. This function now takes an extra parameter: the
initial top of stack. This is useful in uClinux when there's no fixed location
to which the stack pointer can be initialised.
Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat ../setup_arg_pages-2610rc1mm4.diff
ia64/ia32/binfmt_elf32.c | 2 +-
mips/kernel/irixelf.c | 2 +-
s390/kernel/binfmt_elf32.c | 2 +-
sparc64/kernel/binfmt_aout32.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff -uNrp /warthog/kernels/linux-2.6.10-rc1-mm4/arch/ia64/ia32/binfmt_elf32.c linux-2.6.10-rc1-mm4-frv/arch/ia64/ia32/binfmt_elf32.c
--- /warthog/kernels/linux-2.6.10-rc1-mm4/arch/ia64/ia32/binfmt_elf32.c 2004-10-19 10:41:43.000000000 +0100
+++ linux-2.6.10-rc1-mm4-frv/arch/ia64/ia32/binfmt_elf32.c 2004-11-10 11:08:39.005018449 +0000
@@ -35,7 +35,7 @@ extern void ia64_elf32_init (struct pt_r
static void elf32_set_personality (void);
-#define setup_arg_pages(bprm,exec) ia32_setup_arg_pages(bprm,exec)
+#define setup_arg_pages(bprm,tos,exec) ia32_setup_arg_pages(bprm,exec)
#define elf_map elf32_map
#undef SET_PERSONALITY
diff -uNrp /warthog/kernels/linux-2.6.10-rc1-mm4/arch/mips/kernel/irixelf.c linux-2.6.10-rc1-mm4-frv/arch/mips/kernel/irixelf.c
--- /warthog/kernels/linux-2.6.10-rc1-mm4/arch/mips/kernel/irixelf.c 2004-10-27 17:32:08.000000000 +0100
+++ linux-2.6.10-rc1-mm4-frv/arch/mips/kernel/irixelf.c 2004-11-10 11:05:21.719356169 +0000
@@ -687,7 +687,7 @@ static int load_irix_binary(struct linux
* change some of these later.
*/
current->mm->rss = 0;
- setup_arg_pages(bprm, EXSTACK_DEFAULT);
+ setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
current->mm->start_stack = bprm->p;
/* At this point, we assume that the image should be loaded at
diff -uNrp /warthog/kernels/linux-2.6.10-rc1-mm4/arch/s390/kernel/binfmt_elf32.c linux-2.6.10-rc1-mm4-frv/arch/s390/kernel/binfmt_elf32.c
--- /warthog/kernels/linux-2.6.10-rc1-mm4/arch/s390/kernel/binfmt_elf32.c 2004-11-09 18:15:25.000000000 +0000
+++ linux-2.6.10-rc1-mm4-frv/arch/s390/kernel/binfmt_elf32.c 2004-11-10 11:10:13.682167102 +0000
@@ -164,7 +164,7 @@ struct elf_prpsinfo32
#undef start_thread
#define start_thread start_thread31
-#define setup_arg_pages(bprm, exec) setup_arg_pages32(bprm, exec)
+#define setup_arg_pages(bprm, tos, exec) setup_arg_pages32(bprm, exec)
MODULE_DESCRIPTION("Binary format loader for compatibility with 32bit Linux for S390 binaries,"
" Copyright 2000 IBM Corporation");
diff -uNrp /warthog/kernels/linux-2.6.10-rc1-mm4/arch/sparc64/kernel/binfmt_aout32.c linux-2.6.10-rc1-mm4-frv/arch/sparc64/kernel/binfmt_aout32.c
--- /warthog/kernels/linux-2.6.10-rc1-mm4/arch/sparc64/kernel/binfmt_aout32.c 2004-10-27 17:32:14.000000000 +0100
+++ linux-2.6.10-rc1-mm4-frv/arch/sparc64/kernel/binfmt_aout32.c 2004-11-10 11:07:27.590940142 +0000
@@ -311,7 +311,7 @@ beyond_if:
orig_thr_flags = current_thread_info()->flags;
current_thread_info()->flags |= _TIF_32BIT;
- retval = setup_arg_pages(bprm, EXSTACK_DEFAULT);
+ retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
if (retval < 0) {
current_thread_info()->flags = orig_thr_flags;
next reply other threads:[~2004-11-10 11:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 11:24 David Howells [this message]
2004-11-11 22:36 ` David S. Miller
2004-11-12 2:44 ` Jesse Barnes
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=2555.1100085859@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=arnd@arndb.de \
--cc=davem@redhat.com \
--cc=jbarnes@sgi.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome