aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-06 17:08:47 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-30 23:03:04 -0400
commitf322220d6159455da2b5a8a596d802c8695fed30 (patch)
treea04a6eb85da691bdbb0a46a97c1e447e0435a795 /arch/s390/kernel
parentf9a7e025dfc28783fd2b05812e663251acf4bf21 (diff)
s390: convert to generic kernel_execve()
same situation as with alpha and arm - only massage needed Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/entry.S30
-rw-r--r--arch/s390/kernel/entry64.S31
2 files changed, 12 insertions, 49 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 24de1cd3754b..ef46f66bc0d6 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -355,30 +355,13 @@ ENTRY(kernel_thread_starter)
355# kernel_execve function needs to deal with pt_regs that is not 355# kernel_execve function needs to deal with pt_regs that is not
356# at the usual place 356# at the usual place
357# 357#
358ENTRY(kernel_execve) 358ENTRY(ret_from_kernel_execve)
359 stm %r12,%r15,48(%r15) 359 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
360 lr %r14,%r15 360 lr %r15,%r2
361 l %r13,__LC_SVC_NEW_PSW+4 361 lr %r11,%r2
362 ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE) 362 ahi %r15,-STACK_FRAME_OVERHEAD
363 st %r14,__SF_BACKCHAIN(%r15)
364 la %r12,STACK_FRAME_OVERHEAD(%r15)
365 xc 0(__PT_SIZE,%r12),0(%r12)
366 l %r1,BASED(.Ldo_execve)
367 lr %r5,%r12
368 basr %r14,%r1 # call do_execve
369 ltr %r2,%r2
370 je 0f
371 ahi %r15,(STACK_FRAME_OVERHEAD + __PT_SIZE)
372 lm %r12,%r15,48(%r15)
373 br %r14
374 # execve succeeded.
3750: ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
376 l %r15,__LC_KERNEL_STACK # load ksp
377 ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
378 la %r11,STACK_FRAME_OVERHEAD(%r15)
379 mvc 0(__PT_SIZE,%r11),0(%r12) # copy pt_regs
380 l %r12,__LC_THREAD_INFO
381 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) 363 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
364 l %r12,__LC_THREAD_INFO
382 ssm __LC_SVC_NEW_PSW # reenable interrupts 365 ssm __LC_SVC_NEW_PSW # reenable interrupts
383 j sysc_return 366 j sysc_return
384 367
@@ -941,7 +924,6 @@ cleanup_idle_wait:
941.Ldo_signal: .long do_signal 924.Ldo_signal: .long do_signal
942.Ldo_notify_resume: .long do_notify_resume 925.Ldo_notify_resume: .long do_notify_resume
943.Ldo_per_trap: .long do_per_trap 926.Ldo_per_trap: .long do_per_trap
944.Ldo_execve: .long do_execve
945.Ljump_table: .long pgm_check_table 927.Ljump_table: .long pgm_check_table
946.Lschedule: .long schedule 928.Lschedule: .long schedule
947#ifdef CONFIG_PREEMPT 929#ifdef CONFIG_PREEMPT
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 39c84e65f74f..3d188f74d4c0 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -369,32 +369,13 @@ ENTRY(kernel_thread_starter)
369 la %r2,0 369 la %r2,0
370 br %r11 # do_exit 370 br %r11 # do_exit
371 371
372# 372ENTRY(ret_from_kernel_execve)
373# kernel_execve function needs to deal with pt_regs that is not 373 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
374# at the usual place 374 lgr %r15,%r2
375# 375 lgr %r11,%r2
376ENTRY(kernel_execve) 376 aghi %r15,-STACK_FRAME_OVERHEAD
377 stmg %r12,%r15,96(%r15)
378 lgr %r14,%r15
379 aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
380 stg %r14,__SF_BACKCHAIN(%r15)
381 la %r12,STACK_FRAME_OVERHEAD(%r15)
382 xc 0(__PT_SIZE,%r12),0(%r12)
383 lgr %r5,%r12
384 brasl %r14,do_execve
385 ltgfr %r2,%r2
386 je 0f
387 aghi %r15,(STACK_FRAME_OVERHEAD + __PT_SIZE)
388 lmg %r12,%r15,96(%r15)
389 br %r14
390 # execve succeeded.
3910: ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
392 lg %r15,__LC_KERNEL_STACK # load ksp
393 aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
394 la %r11,STACK_FRAME_OVERHEAD(%r15)
395 mvc 0(__PT_SIZE,%r11),0(%r12) # copy pt_regs
396 lg %r12,__LC_THREAD_INFO
397 xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) 377 xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
378 lg %r12,__LC_THREAD_INFO
398 ssm __LC_SVC_NEW_PSW # reenable interrupts 379 ssm __LC_SVC_NEW_PSW # reenable interrupts
399 j sysc_return 380 j sysc_return
400 381