Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3db03b4a authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Torvalds
Browse files

[PATCH] rename the provided execve functions to kernel_execve



Some architectures provide an execve function that does not set errno, but
instead returns the result code directly.  Rename these to kernel_execve to
get the right semantics there.  Moreover, there is no reasone for any of these
architectures to still provide __KERNEL_SYSCALLS__ or _syscallN macros, so
remove these right away.

[akpm@osdl.org: build fix]
[bunk@stusta.de: build fix]
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Andi Kleen <ak@muc.de>
Acked-by: default avatarPaul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Richard Curnow <rc@rc0.org.uk>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: Chris Zankel <chris@zankel.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 67608567
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@
#include <asm/cacheflush.h>
#include <asm/vga.h>

#define __KERNEL_SYSCALLS__
#include <asm/unistd.h>

extern struct hwrpb_struct *hwrpb;
@@ -116,7 +115,7 @@ EXPORT_SYMBOL(sys_dup);
EXPORT_SYMBOL(sys_exit);
EXPORT_SYMBOL(sys_write);
EXPORT_SYMBOL(sys_lseek);
EXPORT_SYMBOL(execve);
EXPORT_SYMBOL(kernel_execve);
EXPORT_SYMBOL(sys_setsid);
EXPORT_SYMBOL(sys_wait4);

+5 −5
Original line number Diff line number Diff line
@@ -655,12 +655,12 @@ kernel_thread:
.end kernel_thread

/*
 * execve(path, argv, envp)
 * kernel_execve(path, argv, envp)
 */
	.align	4
	.globl	execve
	.ent	execve
execve:
	.globl	kernel_execve
	.ent	kernel_execve
kernel_execve:
	/* We can be called from a module.  */
	ldgp	$gp, 0($27)
	lda	$sp, -(32+SIZEOF_PT_REGS+8)($sp)
@@ -704,7 +704,7 @@ execve:

1:	lda	$sp, 32+SIZEOF_PT_REGS+8($sp)
	ret
.end execve
.end kernel_execve


/*
+2 −2
Original line number Diff line number Diff line
@@ -279,7 +279,7 @@ out:
	return error;
}

long execve(const char *filename, char **argv, char **envp)
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
{
	struct pt_regs regs;
	int ret;
@@ -317,7 +317,7 @@ long execve(const char *filename, char **argv, char **envp)
 out:
	return ret;
}
EXPORT_SYMBOL(execve);
EXPORT_SYMBOL(kernel_execve);

/*
 * Since loff_t is a 64 bit type we avoid a lot of ABI hastle
+2 −2
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ out:
}

/* FIXME - see if this is correct for arm26 */
long execve(const char *filename, char **argv, char **envp)
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
{
	struct pt_regs regs;
        int ret;
@@ -320,4 +320,4 @@ long execve(const char *filename, char **argv, char **envp)
        return ret;
}

EXPORT_SYMBOL(execve);
EXPORT_SYMBOL(kernel_execve);
+2 −2
Original line number Diff line number Diff line
@@ -492,11 +492,11 @@ GLOBAL_ENTRY(prefetch_stack)
	br.ret.sptk.many rp
END(prefetch_stack)

GLOBAL_ENTRY(execve)
GLOBAL_ENTRY(kernel_execve)
	mov r15=__NR_execve			// put syscall number in place
	break __BREAK_SYSCALL
	br.ret.sptk.many rp
END(execve)
END(kernel_execve)

GLOBAL_ENTRY(clone)
	mov r15=__NR_clone			// put syscall number in place
Loading