diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-11 14:34:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-11 14:34:50 -0400 |
commit | f144c78e525542c94e0dcb171b41cc5ef7b341b3 (patch) | |
tree | a94920a3f87a11ad1875e08619a60e748b626e34 /arch/s390/kernel/swsusp_asm64.S | |
parent | ef1f7a7e878e4ae37b3a78ebdeef9f911bae59df (diff) | |
parent | 6fca97a958bc3c67566aa91eafc6a5be2e66d6b3 (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (21 commits)
[S390] dasd: fix race condition in resume code
[S390] Add EX_TABLE for addressing exception in usercopy functions.
[S390] 64-bit register support for 31-bit processes
[S390] hibernate: Use correct place for CPU address in lowcore
[S390] pm: ignore time spend in suspended state
[S390] zcrypt: Improve some comments
[S390] zcrypt: Fix sparse warning.
[S390] perf_counter: fix vdso detection
[S390] ftrace: drop nmi protection
[S390] compat: fix truncate system call wrapper
[S390] Provide arch specific mdelay implementation.
[S390] Fix enabled udelay for short delays.
[S390] cio: allow setting boxed devices offline
[S390] cio: make not operational handling consistent
[S390] cio: make disconnected handling consistent
[S390] Fix memory leak in /proc/cio_ignore
[S390] cio: channel path memory leak
[S390] module: fix memory leak in s390 module loader
[S390] Enable kmemleak on s390.
[S390] 3270 console build fix
...
Diffstat (limited to 'arch/s390/kernel/swsusp_asm64.S')
-rw-r--r-- | arch/s390/kernel/swsusp_asm64.S | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/arch/s390/kernel/swsusp_asm64.S b/arch/s390/kernel/swsusp_asm64.S index fe927d0bc20b..7c8653e27db6 100644 --- a/arch/s390/kernel/swsusp_asm64.S +++ b/arch/s390/kernel/swsusp_asm64.S | |||
@@ -43,7 +43,7 @@ swsusp_arch_suspend: | |||
43 | lghi %r1,0x1000 | 43 | lghi %r1,0x1000 |
44 | 44 | ||
45 | /* Save CPU address */ | 45 | /* Save CPU address */ |
46 | stap __LC_CPU_ADDRESS(%r1) | 46 | stap __LC_CPU_ADDRESS(%r0) |
47 | 47 | ||
48 | /* Store registers */ | 48 | /* Store registers */ |
49 | mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ | 49 | mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ |
@@ -69,8 +69,21 @@ swsusp_arch_suspend: | |||
69 | stmg %r0,%r15,0x280(%r1) /* store general registers */ | 69 | stmg %r0,%r15,0x280(%r1) /* store general registers */ |
70 | 70 | ||
71 | stpt 0x328(%r1) /* store timer */ | 71 | stpt 0x328(%r1) /* store timer */ |
72 | stck __SF_EMPTY(%r15) /* store clock */ | ||
72 | stckc 0x330(%r1) /* store clock comparator */ | 73 | stckc 0x330(%r1) /* store clock comparator */ |
73 | 74 | ||
75 | /* Update cputime accounting before going to sleep */ | ||
76 | lg %r0,__LC_LAST_UPDATE_TIMER | ||
77 | slg %r0,0x328(%r1) | ||
78 | alg %r0,__LC_SYSTEM_TIMER | ||
79 | stg %r0,__LC_SYSTEM_TIMER | ||
80 | mvc __LC_LAST_UPDATE_TIMER(8),0x328(%r1) | ||
81 | lg %r0,__LC_LAST_UPDATE_CLOCK | ||
82 | slg %r0,__SF_EMPTY(%r15) | ||
83 | alg %r0,__LC_STEAL_TIMER | ||
84 | stg %r0,__LC_STEAL_TIMER | ||
85 | mvc __LC_LAST_UPDATE_CLOCK(8),__SF_EMPTY(%r15) | ||
86 | |||
74 | /* Activate DAT */ | 87 | /* Activate DAT */ |
75 | stosm __SF_EMPTY(%r15),0x04 | 88 | stosm __SF_EMPTY(%r15),0x04 |
76 | 89 | ||
@@ -159,8 +172,7 @@ pgm_check_entry: | |||
159 | larl %r1,.Lresume_cpu /* Resume CPU address: r2 */ | 172 | larl %r1,.Lresume_cpu /* Resume CPU address: r2 */ |
160 | stap 0(%r1) | 173 | stap 0(%r1) |
161 | llgh %r2,0(%r1) | 174 | llgh %r2,0(%r1) |
162 | lghi %r3,0x1000 | 175 | llgh %r1,__LC_CPU_ADDRESS(%r0) /* Suspend CPU address: r1 */ |
163 | llgh %r1,__LC_CPU_ADDRESS(%r3) /* Suspend CPU address: r1 */ | ||
164 | cgr %r1,%r2 | 176 | cgr %r1,%r2 |
165 | je restore_registers /* r1 = r2 -> nothing to do */ | 177 | je restore_registers /* r1 = r2 -> nothing to do */ |
166 | larl %r4,.Lrestart_suspend_psw /* Set new restart PSW */ | 178 | larl %r4,.Lrestart_suspend_psw /* Set new restart PSW */ |
@@ -200,8 +212,11 @@ restart_suspend: | |||
200 | 212 | ||
201 | restore_registers: | 213 | restore_registers: |
202 | /* Restore registers */ | 214 | /* Restore registers */ |
203 | lghi %r13,0x1000 /* %r1 = pointer to save arae */ | 215 | lghi %r13,0x1000 /* %r1 = pointer to save area */ |
204 | 216 | ||
217 | /* Ignore time spent in suspended state. */ | ||
218 | llgf %r1,0x318(%r13) | ||
219 | stck __LC_LAST_UPDATE_CLOCK(%r1) | ||
205 | spt 0x328(%r13) /* reprogram timer */ | 220 | spt 0x328(%r13) /* reprogram timer */ |
206 | //sckc 0x330(%r13) /* set clock comparator */ | 221 | //sckc 0x330(%r13) /* set clock comparator */ |
207 | 222 | ||
@@ -229,9 +244,6 @@ restore_registers: | |||
229 | /* Load old stack */ | 244 | /* Load old stack */ |
230 | lg %r15,0x2f8(%r13) | 245 | lg %r15,0x2f8(%r13) |
231 | 246 | ||
232 | /* Pointer to save area */ | ||
233 | lghi %r13,0x1000 | ||
234 | |||
235 | /* Restore prefix register */ | 247 | /* Restore prefix register */ |
236 | spx 0x318(%r13) | 248 | spx 0x318(%r13) |
237 | 249 | ||