diff options
Diffstat (limited to 'arch/s390/kernel/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 56f5f613b868..29bbfbab7332 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -518,6 +518,8 @@ pgm_no_vtime2: | |||
518 | #endif | 518 | #endif |
519 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 519 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
520 | lg %r1,__TI_task(%r9) | 520 | lg %r1,__TI_task(%r9) |
521 | tm SP_PSW+1(%r15),0x01 # kernel per event ? | ||
522 | jz kernel_per | ||
521 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID | 523 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID |
522 | mvc __THREAD_per+__PER_address(8,%r1),__LC_PER_ADDRESS | 524 | mvc __THREAD_per+__PER_address(8,%r1),__LC_PER_ADDRESS |
523 | mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID | 525 | mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID |
@@ -553,6 +555,16 @@ pgm_no_vtime3: | |||
553 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 555 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
554 | j sysc_do_svc | 556 | j sysc_do_svc |
555 | 557 | ||
558 | # | ||
559 | # per was called from kernel, must be kprobes | ||
560 | # | ||
561 | kernel_per: | ||
562 | lhi %r0,__LC_PGM_OLD_PSW | ||
563 | sth %r0,SP_TRAP(%r15) # set trap indication to pgm check | ||
564 | la %r2,SP_PTREGS(%r15) # address of register-save area | ||
565 | larl %r14,sysc_leave # load adr. of system ret, no work | ||
566 | jg do_single_step # branch to do_single_step | ||
567 | |||
556 | /* | 568 | /* |
557 | * IO interrupt handler routine | 569 | * IO interrupt handler routine |
558 | */ | 570 | */ |
@@ -815,7 +827,7 @@ restart_go: | |||
815 | */ | 827 | */ |
816 | stack_overflow: | 828 | stack_overflow: |
817 | lg %r15,__LC_PANIC_STACK # change to panic stack | 829 | lg %r15,__LC_PANIC_STACK # change to panic stack |
818 | aghi %r1,-SP_SIZE | 830 | aghi %r15,-SP_SIZE |
819 | mvc SP_PSW(16,%r15),0(%r12) # move user PSW to stack | 831 | mvc SP_PSW(16,%r15),0(%r12) # move user PSW to stack |
820 | stmg %r0,%r11,SP_R0(%r15) # store gprs %r0-%r11 to kernel stack | 832 | stmg %r0,%r11,SP_R0(%r15) # store gprs %r0-%r11 to kernel stack |
821 | la %r1,__LC_SAVE_AREA | 833 | la %r1,__LC_SAVE_AREA |
@@ -823,7 +835,7 @@ stack_overflow: | |||
823 | je 0f | 835 | je 0f |
824 | chi %r12,__LC_PGM_OLD_PSW | 836 | chi %r12,__LC_PGM_OLD_PSW |
825 | je 0f | 837 | je 0f |
826 | la %r1,__LC_SAVE_AREA+16 | 838 | la %r1,__LC_SAVE_AREA+32 |
827 | 0: mvc SP_R12(32,%r15),0(%r1) # move %r12-%r15 to stack | 839 | 0: mvc SP_R12(32,%r15),0(%r1) # move %r12-%r15 to stack |
828 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) # clear back chain | 840 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) # clear back chain |
829 | la %r2,SP_PTREGS(%r15) # load pt_regs | 841 | la %r2,SP_PTREGS(%r15) # load pt_regs |