aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/power/swsusp_asm64.S
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-07-24 12:39:49 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-07-24 12:41:00 +0200
commit5f954c3426190f7ae432a09abd62164d5d14c709 (patch)
treec1e9fdd5f374f01c45da82ec5d972626b7c7bd80 /arch/s390/power/swsusp_asm64.S
parent4be3bd7849165e7efa6b0b35a23d6a3598d97465 (diff)
[S390] hibernation: fix lowcore handling
Our swsusp_arch_suspend() backend implementation disables prefixing by setting the contents of the prefix register to 0. However afterwards common code functions are called which might access percpu data structures. Since the lowcore contains e.g. the percpu base pointer this isn't a good idea. So fix this by copying the hibernating cpu's lowcore to absolute address zero. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/power/swsusp_asm64.S')
-rw-r--r--arch/s390/power/swsusp_asm64.S13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/s390/power/swsusp_asm64.S b/arch/s390/power/swsusp_asm64.S
index 76d688da32f..e27bd316489 100644
--- a/arch/s390/power/swsusp_asm64.S
+++ b/arch/s390/power/swsusp_asm64.S
@@ -40,11 +40,11 @@ swsusp_arch_suspend:
/* Store prefix register on stack */
stpx __SF_EMPTY(%r15)
- /* Setup base register for lowcore (absolute 0) */
- llgf %r1,__SF_EMPTY(%r15)
+ /* Save prefix register contents for lowcore */
+ llgf %r4,__SF_EMPTY(%r15)
/* Get pointer to save area */
- aghi %r1,0x1000
+ lghi %r1,0x1000
/* Store registers */
mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */
@@ -79,8 +79,11 @@ swsusp_arch_suspend:
xc __SF_EMPTY(4,%r15),__SF_EMPTY(%r15)
spx __SF_EMPTY(%r15)
- /* Setup lowcore */
- brasl %r14,setup_lowcore_early
+ lghi %r2,0
+ lghi %r3,2*PAGE_SIZE
+ lghi %r5,2*PAGE_SIZE
+1: mvcle %r2,%r4,0
+ jo 1b
/* Save image */
brasl %r14,swsusp_save