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, 13 insertions, 38 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 27b07730b7b8..b2448487854c 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -2,8 +2,7 @@
2 * arch/s390/kernel/entry.S 2 * arch/s390/kernel/entry.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),
@@ -50,9 +49,10 @@ SP_ILC = STACK_FRAME_OVERHEAD + __PT_ILC
50SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP 49SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP
51SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE 50SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE
52 51
53_TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING | \ 52_TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \
54 _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) 53 _TIF_MCCK_PENDING | _TIF_RESTART_SVC | _TIF_SINGLE_STEP )
55_TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING) 54_TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \
55 _TIF_MCCK_PENDING)
56 56
57STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER 57STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER
58STACK_SIZE = 1 << STACK_SHIFT 58STACK_SIZE = 1 << STACK_SHIFT
@@ -251,8 +251,8 @@ sysc_work:
251 bo BASED(sysc_mcck_pending) 251 bo BASED(sysc_mcck_pending)
252 tm __TI_flags+3(%r9),_TIF_NEED_RESCHED 252 tm __TI_flags+3(%r9),_TIF_NEED_RESCHED
253 bo BASED(sysc_reschedule) 253 bo BASED(sysc_reschedule)
254 tm __TI_flags+3(%r9),_TIF_SIGPENDING 254 tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)
255 bo BASED(sysc_sigpending) 255 bnz BASED(sysc_sigpending)
256 tm __TI_flags+3(%r9),_TIF_RESTART_SVC 256 tm __TI_flags+3(%r9),_TIF_RESTART_SVC
257 bo BASED(sysc_restart) 257 bo BASED(sysc_restart)
258 tm __TI_flags+3(%r9),_TIF_SINGLE_STEP 258 tm __TI_flags+3(%r9),_TIF_SINGLE_STEP
@@ -276,12 +276,11 @@ sysc_mcck_pending:
276 br %r1 # TIF bit will be cleared by handler 276 br %r1 # TIF bit will be cleared by handler
277 277
278# 278#
279# _TIF_SIGPENDING is set, call do_signal 279# _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal
280# 280#
281sysc_sigpending: 281sysc_sigpending:
282 ni __TI_flags+3(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP 282 ni __TI_flags+3(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP
283 la %r2,SP_PTREGS(%r15) # load pt_regs 283 la %r2,SP_PTREGS(%r15) # load pt_regs
284 sr %r3,%r3 # clear *oldset
285 l %r1,BASED(.Ldo_signal) 284 l %r1,BASED(.Ldo_signal)
286 basr %r14,%r1 # call do_signal 285 basr %r14,%r1 # call do_signal
287 tm __TI_flags+3(%r9),_TIF_RESTART_SVC 286 tm __TI_flags+3(%r9),_TIF_RESTART_SVC
@@ -397,30 +396,6 @@ sys_rt_sigreturn_glue:
397 l %r1,BASED(.Lrt_sigreturn) 396 l %r1,BASED(.Lrt_sigreturn)
398 br %r1 # branch to sys_sigreturn 397 br %r1 # branch to sys_sigreturn
399 398
400#
401# sigsuspend and rt_sigsuspend need pt_regs as an additional
402# parameter and they have to skip the store of %r2 into the
403# user register %r2 because the return value was set in
404# sigsuspend and rt_sigsuspend already and must not be overwritten!
405#
406
407sys_sigsuspend_glue:
408 lr %r5,%r4 # move mask back
409 lr %r4,%r3 # move history1 parameter
410 lr %r3,%r2 # move history0 parameter
411 la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter
412 l %r1,BASED(.Lsigsuspend)
413 la %r14,4(%r14) # skip store of return value
414 br %r1 # branch to sys_sigsuspend
415
416sys_rt_sigsuspend_glue:
417 lr %r4,%r3 # move sigsetsize parameter
418 lr %r3,%r2 # move unewset parameter
419 la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter
420 l %r1,BASED(.Lrt_sigsuspend)
421 la %r14,4(%r14) # skip store of return value
422 br %r1 # branch to sys_rt_sigsuspend
423
424sys_sigaltstack_glue: 399sys_sigaltstack_glue:
425 la %r4,SP_PTREGS(%r15) # load pt_regs as parameter 400 la %r4,SP_PTREGS(%r15) # load pt_regs as parameter
426 l %r1,BASED(.Lsigaltstack) 401 l %r1,BASED(.Lsigaltstack)
@@ -604,15 +579,16 @@ io_work:
604 lr %r15,%r1 579 lr %r15,%r1
605# 580#
606# One of the work bits is on. Find out which one. 581# One of the work bits is on. Find out which one.
607# Checked are: _TIF_SIGPENDING, _TIF_NEED_RESCHED and _TIF_MCCK_PENDING 582# Checked are: _TIF_SIGPENDING, _TIF_RESTORE_SIGMASK, _TIF_NEED_RESCHED
583# and _TIF_MCCK_PENDING
608# 584#
609io_work_loop: 585io_work_loop:
610 tm __TI_flags+3(%r9),_TIF_MCCK_PENDING 586 tm __TI_flags+3(%r9),_TIF_MCCK_PENDING
611 bo BASED(io_mcck_pending) 587 bo BASED(io_mcck_pending)
612 tm __TI_flags+3(%r9),_TIF_NEED_RESCHED 588 tm __TI_flags+3(%r9),_TIF_NEED_RESCHED
613 bo BASED(io_reschedule) 589 bo BASED(io_reschedule)
614 tm __TI_flags+3(%r9),_TIF_SIGPENDING 590 tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)
615 bo BASED(io_sigpending) 591 bnz BASED(io_sigpending)
616 b BASED(io_leave) 592 b BASED(io_leave)
617 593
618# 594#
@@ -636,12 +612,11 @@ io_reschedule:
636 b BASED(io_work_loop) 612 b BASED(io_work_loop)
637 613
638# 614#
639# _TIF_SIGPENDING is set, call do_signal 615# _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal
640# 616#
641io_sigpending: 617io_sigpending:
642 stosm __SF_EMPTY(%r15),0x03 # reenable interrupts 618 stosm __SF_EMPTY(%r15),0x03 # reenable interrupts
643 la %r2,SP_PTREGS(%r15) # load pt_regs 619 la %r2,SP_PTREGS(%r15) # load pt_regs
644 sr %r3,%r3 # clear *oldset
645 l %r1,BASED(.Ldo_signal) 620 l %r1,BASED(.Ldo_signal)
646 basr %r14,%r1 # call do_signal 621 basr %r14,%r1 # call do_signal
647 stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts 622 stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts