diff options
Diffstat (limited to 'arch/s390/kernel/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 41aca06682aa..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 |
@@ -171,11 +171,10 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ | |||
171 | .macro CREATE_STACK_FRAME psworg,savearea | 171 | .macro CREATE_STACK_FRAME psworg,savearea |
172 | aghi %r15,-SP_SIZE # make room for registers & psw | 172 | aghi %r15,-SP_SIZE # make room for registers & psw |
173 | 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 |
174 | la %r12,\psworg | ||
175 | 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 |
176 | icm %r12,12,__LC_SVC_ILC | 175 | icm %r12,3,__LC_SVC_ILC |
177 | 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 |
178 | st %r12,SP_ILC(%r15) | 177 | st %r12,SP_SVCNR(%r15) |
179 | mvc SP_R12(32,%r15),\savearea # move %r12-%r15 to stack | 178 | mvc SP_R12(32,%r15),\savearea # move %r12-%r15 to stack |
180 | la %r12,0 | 179 | la %r12,0 |
181 | stg %r12,__SF_BACKCHAIN(%r15) | 180 | stg %r12,__SF_BACKCHAIN(%r15) |
@@ -250,16 +249,17 @@ sysc_update: | |||
250 | #endif | 249 | #endif |
251 | sysc_do_svc: | 250 | sysc_do_svc: |
252 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 251 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
253 | slag %r7,%r7,2 # *4 and test for svc 0 | 252 | ltgr %r7,%r7 # test for svc 0 |
254 | jnz sysc_nr_ok | 253 | jnz sysc_nr_ok |
255 | # svc 0: system call number in %r1 | 254 | # svc 0: system call number in %r1 |
256 | cl %r1,BASED(.Lnr_syscalls) | 255 | cl %r1,BASED(.Lnr_syscalls) |
257 | jnl sysc_nr_ok | 256 | jnl sysc_nr_ok |
258 | lgfr %r7,%r1 # clear high word in r1 | 257 | lgfr %r7,%r1 # clear high word in r1 |
259 | slag %r7,%r7,2 # svc 0: system call number in %r1 | ||
260 | sysc_nr_ok: | 258 | sysc_nr_ok: |
261 | mvc SP_ARGS(8,%r15),SP_R7(%r15) | 259 | mvc SP_ARGS(8,%r15),SP_R7(%r15) |
262 | sysc_do_restart: | 260 | sysc_do_restart: |
261 | sth %r7,SP_SVCNR(%r15) | ||
262 | sllg %r7,%r7,2 # svc number * 4 | ||
263 | larl %r10,sys_call_table | 263 | larl %r10,sys_call_table |
264 | #ifdef CONFIG_COMPAT | 264 | #ifdef CONFIG_COMPAT |
265 | 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 ? |
@@ -363,7 +363,6 @@ sysc_notify_resume: | |||
363 | sysc_restart: | 363 | sysc_restart: |
364 | 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 |
365 | lg %r7,SP_R2(%r15) # load new svc number | 365 | lg %r7,SP_R2(%r15) # load new svc number |
366 | slag %r7,%r7,2 # *4 | ||
367 | 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 |
368 | lmg %r2,%r6,SP_R2(%r15) # load svc arguments | 367 | lmg %r2,%r6,SP_R2(%r15) # load svc arguments |
369 | j sysc_do_restart # restart svc | 368 | j sysc_do_restart # restart svc |
@@ -372,9 +371,8 @@ sysc_restart: | |||
372 | # _TIF_SINGLE_STEP is set, call do_single_step | 371 | # _TIF_SINGLE_STEP is set, call do_single_step |
373 | # | 372 | # |
374 | sysc_singlestep: | 373 | sysc_singlestep: |
375 | 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 |
376 | lhi %r0,__LC_PGM_OLD_PSW | 375 | xc SP_SVCNR(2,%r15),SP_SVCNR(%r15) # clear svc number |
377 | sth %r0,SP_TRAP(%r15) # set trap indication to pgm check | ||
378 | la %r2,SP_PTREGS(%r15) # address of register-save area | 376 | la %r2,SP_PTREGS(%r15) # address of register-save area |
379 | larl %r14,sysc_return # load adr. of system return | 377 | larl %r14,sysc_return # load adr. of system return |
380 | jg do_single_step # branch to do_sigtrap | 378 | jg do_single_step # branch to do_sigtrap |
@@ -392,7 +390,7 @@ sysc_tracesys: | |||
392 | lghi %r0,NR_syscalls | 390 | lghi %r0,NR_syscalls |
393 | clgr %r0,%r2 | 391 | clgr %r0,%r2 |
394 | jnh sysc_tracenogo | 392 | jnh sysc_tracenogo |
395 | slag %r7,%r2,2 # *4 | 393 | sllg %r7,%r2,2 # svc number *4 |
396 | lgf %r8,0(%r7,%r10) | 394 | lgf %r8,0(%r7,%r10) |
397 | sysc_tracego: | 395 | sysc_tracego: |
398 | lmg %r3,%r6,SP_R3(%r15) | 396 | lmg %r3,%r6,SP_R3(%r15) |
@@ -567,8 +565,7 @@ pgm_svcper: | |||
567 | # per was called from kernel, must be kprobes | 565 | # per was called from kernel, must be kprobes |
568 | # | 566 | # |
569 | kernel_per: | 567 | kernel_per: |
570 | lhi %r0,__LC_PGM_OLD_PSW | 568 | xc SP_SVCNR(2,%r15),SP_SVCNR(%r15) # clear svc number |
571 | sth %r0,SP_TRAP(%r15) # set trap indication to pgm check | ||
572 | la %r2,SP_PTREGS(%r15) # address of register-save area | 569 | la %r2,SP_PTREGS(%r15) # address of register-save area |
573 | larl %r14,sysc_restore # load adr. of system ret, no work | 570 | larl %r14,sysc_restore # load adr. of system ret, no work |
574 | jg do_single_step # branch to do_single_step | 571 | jg do_single_step # branch to do_single_step |