aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/power/swsusp_asm64.S
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-07-24 06:39:49 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-07-24 06:41:00 -0400
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 76d688da32fa..e27bd3164897 100644
--- a/arch/s390/power/swsusp_asm64.S
+++ b/arch/s390/power/swsusp_asm64.S
@@ -40,11 +40,11 @@ swsusp_arch_suspend:
40 /* Store prefix register on stack */ 40 /* Store prefix register on stack */
41 stpx __SF_EMPTY(%r15) 41 stpx __SF_EMPTY(%r15)
42 42
43 /* Setup base register for lowcore (absolute 0) */ 43 /* Save prefix register contents for lowcore */
44 llgf %r1,__SF_EMPTY(%r15) 44 llgf %r4,__SF_EMPTY(%r15)
45 45
46 /* Get pointer to save area */ 46 /* Get pointer to save area */
47 aghi %r1,0x1000 47 lghi %r1,0x1000
48 48
49 /* Store registers */ 49 /* Store registers */
50 mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ 50 mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */
@@ -79,8 +79,11 @@ swsusp_arch_suspend:
79 xc __SF_EMPTY(4,%r15),__SF_EMPTY(%r15) 79 xc __SF_EMPTY(4,%r15),__SF_EMPTY(%r15)
80 spx __SF_EMPTY(%r15) 80 spx __SF_EMPTY(%r15)
81 81
82 /* Setup lowcore */ 82 lghi %r2,0
83 brasl %r14,setup_lowcore_early 83 lghi %r3,2*PAGE_SIZE
84 lghi %r5,2*PAGE_SIZE
851: mvcle %r2,%r4,0
86 jo 1b
84 87
85 /* Save image */ 88 /* Save image */
86 brasl %r14,swsusp_save 89 brasl %r14,swsusp_save