diff options
Diffstat (limited to 'arch/s390/kernel/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 50 |
1 files changed, 20 insertions, 30 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 8f211ad1c695..07d8de353984 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -353,41 +353,31 @@ ENTRY(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 ? | 355 | tm __PT_PSW+1(%r11),0x01 # forking a kernel thread ? |
356 | jo 0f | 356 | je 1f |
357 | stg %r15,__PT_R15(%r11) # store stack pointer for new kthread | 357 | brasl %r14,schedule_tail |
358 | 0: brasl %r14,schedule_tail | ||
359 | TRACE_IRQS_ON | 358 | TRACE_IRQS_ON |
360 | ssm __LC_SVC_NEW_PSW # reenable interrupts | 359 | ssm __LC_SVC_NEW_PSW # reenable interrupts |
361 | j sysc_tracenogo | 360 | j sysc_tracenogo |
362 | 361 | 1: # it's a kernel thread | |
363 | # | 362 | stg %r15,__PT_R15(%r11) # store stack pointer for new kthread |
364 | # kernel_execve function needs to deal with pt_regs that is not | 363 | brasl %r14,schedule_tail |
365 | # at the usual place | 364 | TRACE_IRQS_ON |
366 | # | 365 | ssm __LC_SVC_NEW_PSW # reenable interrupts |
367 | ENTRY(kernel_execve) | 366 | lmg %r9,%r11,__PT_R9(%r11) # load gprs |
368 | stmg %r12,%r15,96(%r15) | 367 | ENTRY(kernel_thread_starter) |
369 | lgr %r14,%r15 | 368 | la %r2,0(%r10) |
370 | aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE) | 369 | basr %r14,%r9 |
371 | stg %r14,__SF_BACKCHAIN(%r15) | 370 | la %r2,0 |
372 | la %r12,STACK_FRAME_OVERHEAD(%r15) | 371 | br %r11 # do_exit |
373 | xc 0(__PT_SIZE,%r12),0(%r12) | 372 | |
374 | lgr %r5,%r12 | 373 | ENTRY(ret_from_kernel_execve) |
375 | brasl %r14,do_execve | 374 | ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts |
376 | ltgfr %r2,%r2 | 375 | lgr %r15,%r2 |
377 | je 0f | 376 | lgr %r11,%r2 |
378 | aghi %r15,(STACK_FRAME_OVERHEAD + __PT_SIZE) | 377 | aghi %r15,-STACK_FRAME_OVERHEAD |
379 | lmg %r12,%r15,96(%r15) | ||
380 | br %r14 | ||
381 | # execve succeeded. | ||
382 | 0: ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts | ||
383 | lg %r15,__LC_KERNEL_STACK # load ksp | ||
384 | aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE) | ||
385 | la %r11,STACK_FRAME_OVERHEAD(%r15) | ||
386 | mvc 0(__PT_SIZE,%r11),0(%r12) # copy pt_regs | ||
387 | lg %r12,__LC_THREAD_INFO | ||
388 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) | 378 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) |
379 | lg %r12,__LC_THREAD_INFO | ||
389 | ssm __LC_SVC_NEW_PSW # reenable interrupts | 380 | ssm __LC_SVC_NEW_PSW # reenable interrupts |
390 | brasl %r14,execve_tail | ||
391 | j sysc_return | 381 | j sysc_return |
392 | 382 | ||
393 | /* | 383 | /* |