diff options
Diffstat (limited to 'arch/s390/kernel/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index d7ce150453f2..89c121ae6339 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -46,7 +46,7 @@ SP_R14 = STACK_FRAME_OVERHEAD + __PT_GPRS + 112 | |||
46 | SP_R15 = STACK_FRAME_OVERHEAD + __PT_GPRS + 120 | 46 | SP_R15 = STACK_FRAME_OVERHEAD + __PT_GPRS + 120 |
47 | SP_ORIG_R2 = STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2 | 47 | SP_ORIG_R2 = STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2 |
48 | SP_ILC = STACK_FRAME_OVERHEAD + __PT_ILC | 48 | SP_ILC = STACK_FRAME_OVERHEAD + __PT_ILC |
49 | SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP | 49 | SP_SVCNR = STACK_FRAME_OVERHEAD + __PT_SVCNR |
50 | SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE | 50 | SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE |
51 | 51 | ||
52 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER | 52 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER |
@@ -61,19 +61,22 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ | |||
61 | 61 | ||
62 | #ifdef CONFIG_TRACE_IRQFLAGS | 62 | #ifdef CONFIG_TRACE_IRQFLAGS |
63 | .macro TRACE_IRQS_ON | 63 | .macro TRACE_IRQS_ON |
64 | brasl %r14,trace_hardirqs_on | 64 | basr %r2,%r0 |
65 | brasl %r14,trace_hardirqs_on_caller | ||
65 | .endm | 66 | .endm |
66 | 67 | ||
67 | .macro TRACE_IRQS_OFF | 68 | .macro TRACE_IRQS_OFF |
68 | brasl %r14,trace_hardirqs_off | 69 | basr %r2,%r0 |
70 | brasl %r14,trace_hardirqs_off_caller | ||
69 | .endm | 71 | .endm |
70 | 72 | ||
71 | .macro TRACE_IRQS_CHECK | 73 | .macro TRACE_IRQS_CHECK |
74 | basr %r2,%r0 | ||
72 | tm SP_PSW(%r15),0x03 # irqs enabled? | 75 | tm SP_PSW(%r15),0x03 # irqs enabled? |
73 | jz 0f | 76 | jz 0f |
74 | brasl %r14,trace_hardirqs_on | 77 | brasl %r14,trace_hardirqs_on_caller |
75 | j 1f | 78 | j 1f |
76 | 0: brasl %r14,trace_hardirqs_off | 79 | 0: brasl %r14,trace_hardirqs_off_caller |
77 | 1: | 80 | 1: |
78 | .endm | 81 | .endm |
79 | #else | 82 | #else |
@@ -168,11 +171,10 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ | |||
168 | .macro CREATE_STACK_FRAME psworg,savearea | 171 | .macro CREATE_STACK_FRAME psworg,savearea |
169 | aghi %r15,-SP_SIZE # make room for registers & psw | 172 | aghi %r15,-SP_SIZE # make room for registers & psw |
170 | mvc SP_PSW(16,%r15),0(%r12) # move user PSW to stack | 173 | mvc SP_PSW(16,%r15),0(%r12) # move user PSW to stack |
171 | la %r12,\psworg | ||
172 | stg %r2,SP_ORIG_R2(%r15) # store original content of gpr 2 | 174 | stg %r2,SP_ORIG_R2(%r15) # store original content of gpr 2 |
173 | icm %r12,12,__LC_SVC_ILC | 175 | icm %r12,3,__LC_SVC_ILC |
174 | stmg %r0,%r11,SP_R0(%r15) # store gprs %r0-%r11 to kernel stack | 176 | stmg %r0,%r11,SP_R0(%r15) # store gprs %r0-%r11 to kernel stack |
175 | st %r12,SP_ILC(%r15) | 177 | st %r12,SP_SVCNR(%r15) |
176 | mvc SP_R12(32,%r15),\savearea # move %r12-%r15 to stack | 178 | mvc SP_R12(32,%r15),\savearea # move %r12-%r15 to stack |
177 | la %r12,0 | 179 | la %r12,0 |
178 | stg %r12,__SF_BACKCHAIN(%r15) | 180 | stg %r12,__SF_BACKCHAIN(%r15) |
@@ -247,16 +249,17 @@ sysc_update: | |||
247 | #endif | 249 | #endif |
248 | sysc_do_svc: | 250 | sysc_do_svc: |
249 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 251 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
250 | slag %r7,%r7,2 # *4 and test for svc 0 | 252 | ltgr %r7,%r7 # test for svc 0 |
251 | jnz sysc_nr_ok | 253 | jnz sysc_nr_ok |
252 | # svc 0: system call number in %r1 | 254 | # svc 0: system call number in %r1 |
253 | cl %r1,BASED(.Lnr_syscalls) | 255 | cl %r1,BASED(.Lnr_syscalls) |
254 | jnl sysc_nr_ok | 256 | jnl sysc_nr_ok |
255 | lgfr %r7,%r1 # clear high word in r1 | 257 | lgfr %r7,%r1 # clear high word in r1 |
256 | slag %r7,%r7,2 # svc 0: system call number in %r1 | ||
257 | sysc_nr_ok: | 258 | sysc_nr_ok: |
258 | mvc SP_ARGS(8,%r15),SP_R7(%r15) | 259 | mvc SP_ARGS(8,%r15),SP_R7(%r15) |
259 | sysc_do_restart: | 260 | sysc_do_restart: |
261 | sth %r7,SP_SVCNR(%r15) | ||
262 | sllg %r7,%r7,2 # svc number * 4 | ||
260 | larl %r10,sys_call_table | 263 | larl %r10,sys_call_table |
261 | #ifdef CONFIG_COMPAT | 264 | #ifdef CONFIG_COMPAT |
262 | tm __TI_flags+5(%r9),(_TIF_31BIT>>16) # running in 31 bit mode ? | 265 | tm __TI_flags+5(%r9),(_TIF_31BIT>>16) # running in 31 bit mode ? |
@@ -360,7 +363,6 @@ sysc_notify_resume: | |||
360 | sysc_restart: | 363 | sysc_restart: |
361 | ni __TI_flags+7(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC | 364 | ni __TI_flags+7(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC |
362 | lg %r7,SP_R2(%r15) # load new svc number | 365 | lg %r7,SP_R2(%r15) # load new svc number |
363 | slag %r7,%r7,2 # *4 | ||
364 | mvc SP_R2(8,%r15),SP_ORIG_R2(%r15) # restore first argument | 366 | mvc SP_R2(8,%r15),SP_ORIG_R2(%r15) # restore first argument |
365 | lmg %r2,%r6,SP_R2(%r15) # load svc arguments | 367 | lmg %r2,%r6,SP_R2(%r15) # load svc arguments |
366 | j sysc_do_restart # restart svc | 368 | j sysc_do_restart # restart svc |
@@ -369,9 +371,8 @@ sysc_restart: | |||
369 | # _TIF_SINGLE_STEP is set, call do_single_step | 371 | # _TIF_SINGLE_STEP is set, call do_single_step |
370 | # | 372 | # |
371 | sysc_singlestep: | 373 | sysc_singlestep: |
372 | ni __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP | 374 | ni __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP |
373 | lhi %r0,__LC_PGM_OLD_PSW | 375 | xc SP_SVCNR(2,%r15),SP_SVCNR(%r15) # clear svc number |
374 | sth %r0,SP_TRAP(%r15) # set trap indication to pgm check | ||
375 | la %r2,SP_PTREGS(%r15) # address of register-save area | 376 | la %r2,SP_PTREGS(%r15) # address of register-save area |
376 | larl %r14,sysc_return # load adr. of system return | 377 | larl %r14,sysc_return # load adr. of system return |
377 | jg do_single_step # branch to do_sigtrap | 378 | jg do_single_step # branch to do_sigtrap |
@@ -389,7 +390,7 @@ sysc_tracesys: | |||
389 | lghi %r0,NR_syscalls | 390 | lghi %r0,NR_syscalls |
390 | clgr %r0,%r2 | 391 | clgr %r0,%r2 |
391 | jnh sysc_tracenogo | 392 | jnh sysc_tracenogo |
392 | slag %r7,%r2,2 # *4 | 393 | sllg %r7,%r2,2 # svc number *4 |
393 | lgf %r8,0(%r7,%r10) | 394 | lgf %r8,0(%r7,%r10) |
394 | sysc_tracego: | 395 | sysc_tracego: |
395 | lmg %r3,%r6,SP_R3(%r15) | 396 | lmg %r3,%r6,SP_R3(%r15) |
@@ -564,8 +565,7 @@ pgm_svcper: | |||
564 | # per was called from kernel, must be kprobes | 565 | # per was called from kernel, must be kprobes |
565 | # | 566 | # |
566 | kernel_per: | 567 | kernel_per: |
567 | lhi %r0,__LC_PGM_OLD_PSW | 568 | xc SP_SVCNR(2,%r15),SP_SVCNR(%r15) # clear svc number |
568 | sth %r0,SP_TRAP(%r15) # set trap indication to pgm check | ||
569 | la %r2,SP_PTREGS(%r15) # address of register-save area | 569 | la %r2,SP_PTREGS(%r15) # address of register-save area |
570 | larl %r14,sysc_restore # load adr. of system ret, no work | 570 | larl %r14,sysc_restore # load adr. of system ret, no work |
571 | jg do_single_step # branch to do_single_step | 571 | jg do_single_step # branch to do_single_step |