From: Max Filippov <jcmvbkbc@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-arch@vger.kernel.org, Chris Zankel <chris@zankel.net>,
Marc Gauthier <marc@tensilica.com>,
Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH v2 3/4] xtensa: switch to generic kernel_execve()
Date: Mon, 29 Oct 2012 18:56:20 +0400 [thread overview]
Message-ID: <1351522581-30516-4-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1351522581-30516-1-git-send-email-jcmvbkbc@gmail.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
arch/xtensa/Kconfig | 1 +
arch/xtensa/kernel/entry.S | 18 +-----------------
2 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 1033a1a..e957454 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -14,6 +14,7 @@ config XTENSA
select MODULES_USE_ELF_RELA
select GENERIC_PCI_IOMAP
select GENERIC_KERNEL_THREAD
+ select GENERIC_KERNEL_EXECVE
select ARCH_WANT_OPTIONAL_GPIOLIB
select OF
select OF_EARLY_FLATTREE
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
index 0fc994f..7da2c02 100644
--- a/arch/xtensa/kernel/entry.S
+++ b/arch/xtensa/kernel/entry.S
@@ -1833,22 +1833,6 @@ ENTRY(system_call)
/*
- * Do a system call from kernel instead of calling sys_execve, so we end up
- * with proper pt_regs.
- *
- * int kernel_execve(const char *fname, char *const argv[], charg *const envp[])
- * a2 a2 a3 a4
- */
-
-ENTRY(kernel_execve)
- entry a1, 16
- mov a6, a2 # arg0 is in a6
- movi a2, __NR_execve
- syscall
-
- retw
-
-/*
* Task switch.
*
* struct task* _switch_to (struct task* prev, struct task* next)
@@ -1940,6 +1924,6 @@ ENTRY(ret_from_kernel_thread)
call4 schedule_tail
mov a6, a3
callx4 a2
- call4 do_exit
+ j common_exception_return
ENDPROC(ret_from_kernel_thread)
--
1.7.7.6
next prev parent reply other threads:[~2012-10-29 14:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 14:56 [PATCH v2 0/4] xtensa: conversion to generic kernel_thread and friends Max Filippov
2012-10-29 14:56 ` [PATCH v2 1/4] xtensa: reset windowbase/windowstart when cloning the VM Max Filippov
2012-10-29 16:10 ` Marc Gauthier
2012-10-29 14:56 ` [PATCH v2 2/4] xtensa: switch to generic kernel_thread() Max Filippov
2012-10-29 14:56 ` Max Filippov [this message]
2012-10-29 14:56 ` [PATCH v2 4/4] xtensa: switch to generic sys_execve() Max Filippov
2012-10-29 16:23 ` [PATCH v2 0/4] xtensa: conversion to generic kernel_thread and friends czankel
2012-10-29 16:58 ` Max Filippov
2012-10-29 18:11 ` Al Viro
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=1351522581-30516-4-git-send-email-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=chris@zankel.net \
--cc=linux-arch@vger.kernel.org \
--cc=marc@tensilica.com \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).