diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2020-05-12 19:15:26 +0200 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2020-06-23 10:49:56 +0200 |
commit | a4261d4bb45022e1b8b95df13dbb05abac490165 (patch) | |
tree | 72504dbe0f99175dbed9f47851dcb114f8036282 /arch/sparc/kernel/kernel.h | |
parent | dcad2a62bc7948342404217831233957e8f169cc (diff) | |
download | linux-a4261d4bb45022e1b8b95df13dbb05abac490165.tar.gz linux-a4261d4bb45022e1b8b95df13dbb05abac490165.tar.bz2 linux-a4261d4bb45022e1b8b95df13dbb05abac490165.zip |
sparc: share process creation helpers between sparc and sparc64
As promised in the previous patch, this moves the process creation
helpers into a common process.c file that is shared between sparc and
sparc64. It allows us to get rid of quite a bit custom assembler and the
to remove the separe 32bit specific sparc_do_fork() call.
One thing to note, is that when clone() was called with a separate stack
for the child the assembler would align it. But copy_thread() has always
been doing that too so that line wasn't needed and can thus simply be
removed.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Guo Ren <guoren@kernel.org>
Cc: linux-csky@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Link: https://lore.kernel.org/r/20200512171527.570109-3-christian.brauner@ubuntu.com
Diffstat (limited to 'arch/sparc/kernel/kernel.h')
-rw-r--r-- | arch/sparc/kernel/kernel.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index f6f498ba3198..9cd09a3ef35f 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h @@ -14,6 +14,11 @@ extern const char *sparc_pmu_type; extern unsigned int fsr_storage; extern int ncpus_probed; +/* process{_32,_64}.c */ +asmlinkage long sparc_clone(struct pt_regs *regs); +asmlinkage long sparc_fork(struct pt_regs *regs); +asmlinkage long sparc_vfork(struct pt_regs *regs); + #ifdef CONFIG_SPARC64 /* setup_64.c */ struct seq_file; @@ -153,12 +158,6 @@ void floppy_hardint(void); extern unsigned long sun4m_cpu_startup; extern unsigned long sun4d_cpu_startup; -/* process_32.c */ -asmlinkage int sparc_do_fork(unsigned long clone_flags, - unsigned long stack_start, - struct pt_regs *regs, - unsigned long stack_size); - /* signal_32.c */ asmlinkage void do_sigreturn(struct pt_regs *regs); asmlinkage void do_rt_sigreturn(struct pt_regs *regs); |