diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-09-22 22:58:45 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-09-22 22:58:44 +0200 |
commit | 2583d1efe04170cf166d43da6e4ed309e5601e84 (patch) | |
tree | 39fcc09b207d1cc50545643bc1a6d8db41c95d20 /arch/s390/kernel/swsusp_asm64.S | |
parent | 846955c8afe5ebca2f8841b042ca3342e08a092b (diff) |
[S390] hibernation: reset system after resume
Force system into defined state after resume.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/swsusp_asm64.S')
-rw-r--r-- | arch/s390/kernel/swsusp_asm64.S | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/arch/s390/kernel/swsusp_asm64.S b/arch/s390/kernel/swsusp_asm64.S index 9a86ccb91a8a..fc056810a017 100644 --- a/arch/s390/kernel/swsusp_asm64.S +++ b/arch/s390/kernel/swsusp_asm64.S @@ -108,7 +108,8 @@ swsusp_arch_resume: #ifdef CONFIG_SMP /* Save boot cpu number */ brasl %r14,smp_get_phys_cpu_id - lgr %r10,%r2 + larl %r1,saved_cpu_id + st %r2,0(%r1) #endif /* Deactivate DAT */ stnsm __SF_EMPTY(%r15),0xfb @@ -136,6 +137,29 @@ swsusp_arch_resume: 2: ptlb /* flush tlb */ + /* Reset System */ + larl %r1,restart_entry + larl %r2,restart_psw + og %r1,0(%r2) + stg %r1,0(%r0) + larl %r1,saved_pgm_check_psw + mvc 0(16,%r1),__LC_PGM_NEW_PSW(%r0) + larl %r1,new_pgm_check_psw + epsw %r2,%r3 + stm %r2,%r3,0(%r1) + mvc __LC_PGM_NEW_PSW(16,%r0),0(%r1) + lghi %r0,0 + diag %r0,%r0,0x308 +restart_entry: + lhi %r1,1 + sigp %r1,%r0,0x12 + sam64 + larl %r1,new_pgm_check_psw + lpswe 0(%r1) +pgm_check_entry: + larl %r1,saved_pgm_check_psw + mvc __LC_PGM_NEW_PSW(16,%r0),0(%r1) + /* Restore registers */ lghi %r13,0x1000 /* %r1 = pointer to save arae */ @@ -171,7 +195,8 @@ swsusp_arch_resume: #ifdef CONFIG_SMP /* Switch CPUs */ - lgr %r2,%r10 /* get cpu id */ + larl %r1,saved_cpu_id + llgf %r2,0(%r1) llgf %r3,0x318(%r13) brasl %r14,smp_switch_boot_cpu_in_resume #endif @@ -189,3 +214,16 @@ swsusp_arch_resume: lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15) lghi %r2,0 br %r14 + + .section .data.nosave,"aw",@progbits + .align 8 +restart_psw: + .long 0x00080000,0x80000000 +new_pgm_check_psw: + .quad 0,pgm_check_entry +saved_pgm_check_psw: + .quad 0,0 +#ifdef CONFIG_SMP +saved_cpu_id: + .long 0 +#endif |