diff options
Diffstat (limited to 'arch/s390/kernel/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 75 |
1 files changed, 14 insertions, 61 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 369ab4413ec7..2ac095bc0e25 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -1,9 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/entry.S | 2 | * arch/s390/kernel/entry64.S |
3 | * S390 low-level entry points. | 3 | * S390 low-level entry points. |
4 | * | 4 | * |
5 | * S390 version | 5 | * Copyright (C) IBM Corp. 1999,2006 |
6 | * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation | ||
7 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), | 6 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), |
8 | * Hartmut Penner (hp@de.ibm.com), | 7 | * Hartmut Penner (hp@de.ibm.com), |
9 | * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com), | 8 | * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com), |
@@ -53,9 +52,10 @@ SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE | |||
53 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER | 52 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER |
54 | STACK_SIZE = 1 << STACK_SHIFT | 53 | STACK_SIZE = 1 << STACK_SHIFT |
55 | 54 | ||
56 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING | \ | 55 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ |
57 | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) | 56 | _TIF_MCCK_PENDING | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) |
58 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING) | 57 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ |
58 | _TIF_MCCK_PENDING) | ||
59 | 59 | ||
60 | #define BASED(name) name-system_call(%r13) | 60 | #define BASED(name) name-system_call(%r13) |
61 | 61 | ||
@@ -249,8 +249,8 @@ sysc_work: | |||
249 | jo sysc_mcck_pending | 249 | jo sysc_mcck_pending |
250 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED | 250 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED |
251 | jo sysc_reschedule | 251 | jo sysc_reschedule |
252 | tm __TI_flags+7(%r9),_TIF_SIGPENDING | 252 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
253 | jo sysc_sigpending | 253 | jnz sysc_sigpending |
254 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC | 254 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC |
255 | jo sysc_restart | 255 | jo sysc_restart |
256 | tm __TI_flags+7(%r9),_TIF_SINGLE_STEP | 256 | tm __TI_flags+7(%r9),_TIF_SINGLE_STEP |
@@ -272,12 +272,11 @@ sysc_mcck_pending: | |||
272 | jg s390_handle_mcck # TIF bit will be cleared by handler | 272 | jg s390_handle_mcck # TIF bit will be cleared by handler |
273 | 273 | ||
274 | # | 274 | # |
275 | # _TIF_SIGPENDING is set, call do_signal | 275 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal |
276 | # | 276 | # |
277 | sysc_sigpending: | 277 | sysc_sigpending: |
278 | ni __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP | 278 | ni __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP |
279 | la %r2,SP_PTREGS(%r15) # load pt_regs | 279 | la %r2,SP_PTREGS(%r15) # load pt_regs |
280 | sgr %r3,%r3 # clear *oldset | ||
281 | brasl %r14,do_signal # call do_signal | 280 | brasl %r14,do_signal # call do_signal |
282 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC | 281 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC |
283 | jo sysc_restart | 282 | jo sysc_restart |
@@ -414,52 +413,6 @@ sys32_rt_sigreturn_glue: | |||
414 | jg sys32_rt_sigreturn # branch to sys32_sigreturn | 413 | jg sys32_rt_sigreturn # branch to sys32_sigreturn |
415 | #endif | 414 | #endif |
416 | 415 | ||
417 | # | ||
418 | # sigsuspend and rt_sigsuspend need pt_regs as an additional | ||
419 | # parameter and they have to skip the store of %r2 into the | ||
420 | # user register %r2 because the return value was set in | ||
421 | # sigsuspend and rt_sigsuspend already and must not be overwritten! | ||
422 | # | ||
423 | |||
424 | sys_sigsuspend_glue: | ||
425 | lgr %r5,%r4 # move mask back | ||
426 | lgr %r4,%r3 # move history1 parameter | ||
427 | lgr %r3,%r2 # move history0 parameter | ||
428 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
429 | la %r14,6(%r14) # skip store of return value | ||
430 | jg sys_sigsuspend # branch to sys_sigsuspend | ||
431 | |||
432 | #ifdef CONFIG_COMPAT | ||
433 | sys32_sigsuspend_glue: | ||
434 | llgfr %r4,%r4 # unsigned long | ||
435 | lgr %r5,%r4 # move mask back | ||
436 | lgfr %r3,%r3 # int | ||
437 | lgr %r4,%r3 # move history1 parameter | ||
438 | lgfr %r2,%r2 # int | ||
439 | lgr %r3,%r2 # move history0 parameter | ||
440 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
441 | la %r14,6(%r14) # skip store of return value | ||
442 | jg sys32_sigsuspend # branch to sys32_sigsuspend | ||
443 | #endif | ||
444 | |||
445 | sys_rt_sigsuspend_glue: | ||
446 | lgr %r4,%r3 # move sigsetsize parameter | ||
447 | lgr %r3,%r2 # move unewset parameter | ||
448 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
449 | la %r14,6(%r14) # skip store of return value | ||
450 | jg sys_rt_sigsuspend # branch to sys_rt_sigsuspend | ||
451 | |||
452 | #ifdef CONFIG_COMPAT | ||
453 | sys32_rt_sigsuspend_glue: | ||
454 | llgfr %r3,%r3 # size_t | ||
455 | lgr %r4,%r3 # move sigsetsize parameter | ||
456 | llgtr %r2,%r2 # sigset_emu31_t * | ||
457 | lgr %r3,%r2 # move unewset parameter | ||
458 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
459 | la %r14,6(%r14) # skip store of return value | ||
460 | jg sys32_rt_sigsuspend # branch to sys32_rt_sigsuspend | ||
461 | #endif | ||
462 | |||
463 | sys_sigaltstack_glue: | 416 | sys_sigaltstack_glue: |
464 | la %r4,SP_PTREGS(%r15) # load pt_regs as parameter | 417 | la %r4,SP_PTREGS(%r15) # load pt_regs as parameter |
465 | jg sys_sigaltstack # branch to sys_sigreturn | 418 | jg sys_sigaltstack # branch to sys_sigreturn |
@@ -646,15 +599,16 @@ io_work: | |||
646 | lgr %r15,%r1 | 599 | lgr %r15,%r1 |
647 | # | 600 | # |
648 | # One of the work bits is on. Find out which one. | 601 | # One of the work bits is on. Find out which one. |
649 | # Checked are: _TIF_SIGPENDING, _TIF_NEED_RESCHED and _TIF_MCCK_PENDING | 602 | # Checked are: _TIF_SIGPENDING, _TIF_RESTORE_SIGPENDING, _TIF_NEED_RESCHED |
603 | # and _TIF_MCCK_PENDING | ||
650 | # | 604 | # |
651 | io_work_loop: | 605 | io_work_loop: |
652 | tm __TI_flags+7(%r9),_TIF_MCCK_PENDING | 606 | tm __TI_flags+7(%r9),_TIF_MCCK_PENDING |
653 | jo io_mcck_pending | 607 | jo io_mcck_pending |
654 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED | 608 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED |
655 | jo io_reschedule | 609 | jo io_reschedule |
656 | tm __TI_flags+7(%r9),_TIF_SIGPENDING | 610 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
657 | jo io_sigpending | 611 | jnz io_sigpending |
658 | j io_leave | 612 | j io_leave |
659 | 613 | ||
660 | # | 614 | # |
@@ -676,12 +630,11 @@ io_reschedule: | |||
676 | j io_work_loop | 630 | j io_work_loop |
677 | 631 | ||
678 | # | 632 | # |
679 | # _TIF_SIGPENDING is set, call do_signal | 633 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal |
680 | # | 634 | # |
681 | io_sigpending: | 635 | io_sigpending: |
682 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 636 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
683 | la %r2,SP_PTREGS(%r15) # load pt_regs | 637 | la %r2,SP_PTREGS(%r15) # load pt_regs |
684 | slgr %r3,%r3 # clear *oldset | ||
685 | brasl %r14,do_signal # call do_signal | 638 | brasl %r14,do_signal # call do_signal |
686 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | 639 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts |
687 | j io_work_loop | 640 | j io_work_loop |