aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/entry.S')
-rw-r--r--arch/s390/kernel/entry.S51
1 files changed, 21 insertions, 30 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 870bad6d56fc..ef46f66bc0d6 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -331,45 +331,38 @@ ENTRY(ret_from_fork)
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 ? 333 tm __PT_PSW+1(%r11),0x01 # forking a kernel thread ?
334 jo 0f 334 je 1f
335 st %r15,__PT_R15(%r11) # store stack pointer for new kthread 335 l %r1,BASED(.Lschedule_tail)
3360: l %r1,BASED(.Lschedule_tail)
337 basr %r14,%r1 # call schedule_tail 336 basr %r14,%r1 # call schedule_tail
338 TRACE_IRQS_ON 337 TRACE_IRQS_ON
339 ssm __LC_SVC_NEW_PSW # reenable interrupts 338 ssm __LC_SVC_NEW_PSW # reenable interrupts
340 j sysc_tracenogo 339 j sysc_tracenogo
341 340
3411: # it's a kernel thread
342 st %r15,__PT_R15(%r11) # store stack pointer for new kthread
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)
349 la %r2,0(%r10)
350 basr %r14,%r9
351 la %r2,0
352 br %r11 # do_exit
353
342# 354#
343# 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
344# at the usual place 356# at the usual place
345# 357#
346ENTRY(kernel_execve) 358ENTRY(ret_from_kernel_execve)
347 stm %r12,%r15,48(%r15) 359 ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
348 lr %r14,%r15 360 lr %r15,%r2
349 l %r13,__LC_SVC_NEW_PSW+4 361 lr %r11,%r2
350 ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE) 362 ahi %r15,-STACK_FRAME_OVERHEAD
351 st %r14,__SF_BACKCHAIN(%r15)
352 la %r12,STACK_FRAME_OVERHEAD(%r15)
353 xc 0(__PT_SIZE,%r12),0(%r12)
354 l %r1,BASED(.Ldo_execve)
355 lr %r5,%r12
356 basr %r14,%r1 # call do_execve
357 ltr %r2,%r2
358 je 0f
359 ahi %r15,(STACK_FRAME_OVERHEAD + __PT_SIZE)
360 lm %r12,%r15,48(%r15)
361 br %r14
362 # execve succeeded.
3630: ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
364 l %r15,__LC_KERNEL_STACK # load ksp
365 ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
366 la %r11,STACK_FRAME_OVERHEAD(%r15)
367 mvc 0(__PT_SIZE,%r11),0(%r12) # copy pt_regs
368 l %r12,__LC_THREAD_INFO
369 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) 363 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
364 l %r12,__LC_THREAD_INFO
370 ssm __LC_SVC_NEW_PSW # reenable interrupts 365 ssm __LC_SVC_NEW_PSW # reenable interrupts
371 l %r1,BASED(.Lexecve_tail)
372 basr %r14,%r1 # call execve_tail
373 j sysc_return 366 j sysc_return
374 367
375/* 368/*
@@ -931,8 +924,6 @@ cleanup_idle_wait:
931.Ldo_signal: .long do_signal 924.Ldo_signal: .long do_signal
932.Ldo_notify_resume: .long do_notify_resume 925.Ldo_notify_resume: .long do_notify_resume
933.Ldo_per_trap: .long do_per_trap 926.Ldo_per_trap: .long do_per_trap
934.Ldo_execve: .long do_execve
935.Lexecve_tail: .long execve_tail
936.Ljump_table: .long pgm_check_table 927.Ljump_table: .long pgm_check_table
937.Lschedule: .long schedule 928.Lschedule: .long schedule
938#ifdef CONFIG_PREEMPT 929#ifdef CONFIG_PREEMPT