aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/s390/include/asm/unistd.h1
-rw-r--r--arch/s390/kernel/entry.S32
-rw-r--r--arch/s390/kernel/entry64.S26
4 files changed, 11 insertions, 49 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 3f3d9ca7a5b6..3cdc0f1978ad 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -136,6 +136,7 @@ config S390
136 select KTIME_SCALAR if 32BIT 136 select KTIME_SCALAR if 32BIT
137 select HAVE_ARCH_SECCOMP_FILTER 137 select HAVE_ARCH_SECCOMP_FILTER
138 select GENERIC_KERNEL_THREAD 138 select GENERIC_KERNEL_THREAD
139 select GENERIC_KERNEL_EXECVE
139 select HAVE_MOD_ARCH_SPECIFIC 140 select HAVE_MOD_ARCH_SPECIFIC
140 select MODULES_USE_ELF_RELA 141 select MODULES_USE_ELF_RELA
141 142
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h
index bbbae41fa9a5..ccbcab7742cd 100644
--- a/arch/s390/include/asm/unistd.h
+++ b/arch/s390/include/asm/unistd.h
@@ -54,7 +54,6 @@
54# define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 54# define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
55# endif 55# endif
56#define __ARCH_WANT_SYS_EXECVE 56#define __ARCH_WANT_SYS_EXECVE
57#define __ARCH_WANT_KERNEL_EXECVE
58 57
59/* 58/*
60 * "Conditional" syscalls 59 * "Conditional" syscalls
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index ef46f66bc0d6..aa8f2ba6289b 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -330,40 +330,18 @@ ENTRY(ret_from_fork)
330 la %r11,STACK_FRAME_OVERHEAD(%r15) 330 la %r11,STACK_FRAME_OVERHEAD(%r15)
331 l %r12,__LC_THREAD_INFO 331 l %r12,__LC_THREAD_INFO
332 l %r13,__LC_SVC_NEW_PSW+4 332 l %r13,__LC_SVC_NEW_PSW+4
333 tm __PT_PSW+1(%r11),0x01 # forking a kernel thread ?
334 je 1f
335 l %r1,BASED(.Lschedule_tail) 333 l %r1,BASED(.Lschedule_tail)
336 basr %r14,%r1 # call schedule_tail 334 basr %r14,%r1 # call schedule_tail
337 TRACE_IRQS_ON 335 TRACE_IRQS_ON
338 ssm __LC_SVC_NEW_PSW # reenable interrupts 336 ssm __LC_SVC_NEW_PSW # reenable interrupts
339 j sysc_tracenogo 337 tm __PT_PSW+1(%r11),0x01 # forking a kernel thread ?
340 338 jne sysc_tracenogo
3411: # it's a kernel thread 339 # it's a kernel thread
342 st %r15,__PT_R15(%r11) # store stack pointer for new kthread 340 lm %r9,%r10,__PT_R9(%r11) # load gprs
343 l %r1,BASED(.Lschedule_tail)
344 basr %r14,%r1 # call schedule_tail
345 TRACE_IRQS_ON
346 ssm __LC_SVC_NEW_PSW # reenable interrupts
347 lm %r9,%r11,__PT_R9(%r11) # load gprs
348ENTRY(kernel_thread_starter) 341ENTRY(kernel_thread_starter)
349 la %r2,0(%r10) 342 la %r2,0(%r10)
350 basr %r14,%r9 343 basr %r14,%r9
351 la %r2,0 344 j sysc_tracenogo
352 br %r11 # do_exit
353
354#
355# kernel_execve function needs to deal with pt_regs that is not
356# at the usual place
357#
358ENTRY(ret_from_kernel_execve)
359 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
360 lr %r15,%r2
361 lr %r11,%r2
362 ahi %r15,-STACK_FRAME_OVERHEAD
363 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
364 l %r12,__LC_THREAD_INFO
365 ssm __LC_SVC_NEW_PSW # reenable interrupts
366 j sysc_return
367 345
368/* 346/*
369 * Program check handler routine 347 * Program check handler routine
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 07d8de353984..499e95e90f38 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -352,33 +352,17 @@ sysc_tracenogo:
352ENTRY(ret_from_fork) 352ENTRY(ret_from_fork)
353 la %r11,STACK_FRAME_OVERHEAD(%r15) 353 la %r11,STACK_FRAME_OVERHEAD(%r15)
354 lg %r12,__LC_THREAD_INFO 354 lg %r12,__LC_THREAD_INFO
355 tm __PT_PSW+1(%r11),0x01 # forking a kernel thread ?
356 je 1f
357 brasl %r14,schedule_tail 355 brasl %r14,schedule_tail
358 TRACE_IRQS_ON 356 TRACE_IRQS_ON
359 ssm __LC_SVC_NEW_PSW # reenable interrupts 357 ssm __LC_SVC_NEW_PSW # reenable interrupts
360 j sysc_tracenogo 358 tm __PT_PSW+1(%r11),0x01 # forking a kernel thread ?
3611: # it's a kernel thread 359 jne sysc_tracenogo
362 stg %r15,__PT_R15(%r11) # store stack pointer for new kthread 360 # it's a kernel thread
363 brasl %r14,schedule_tail 361 lmg %r9,%r10,__PT_R9(%r11) # load gprs
364 TRACE_IRQS_ON
365 ssm __LC_SVC_NEW_PSW # reenable interrupts
366 lmg %r9,%r11,__PT_R9(%r11) # load gprs
367ENTRY(kernel_thread_starter) 362ENTRY(kernel_thread_starter)
368 la %r2,0(%r10) 363 la %r2,0(%r10)
369 basr %r14,%r9 364 basr %r14,%r9
370 la %r2,0 365 j sysc_tracenogo
371 br %r11 # do_exit
372
373ENTRY(ret_from_kernel_execve)
374 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
375 lgr %r15,%r2
376 lgr %r11,%r2
377 aghi %r15,-STACK_FRAME_OVERHEAD
378 xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
379 lg %r12,__LC_THREAD_INFO
380 ssm __LC_SVC_NEW_PSW # reenable interrupts
381 j sysc_return
382 366
383/* 367/*
384 * Program check handler routine 368 * Program check handler routine