aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2009-10-06 04:34:11 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-10-06 04:35:09 -0400
commit623c08e4cbf47c29c2516d53f1d78c20896bb712 (patch)
treeb3c2e08498e7837fb5675fe7196a8279b778f476 /arch/s390
parent942b7e65c321b72e1d73daee45291300be87c62b (diff)
[S390] pm: ignore time spend in suspended state
The time a system has been suspended should not show up in any of the cputime accounting fields. The time of inactivity is definitly not any form of real cputime nor is it idle time. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/swsusp_asm64.S21
1 files changed, 17 insertions, 4 deletions
diff --git a/arch/s390/kernel/swsusp_asm64.S b/arch/s390/kernel/swsusp_asm64.S
index fe927d0bc20b..008e35af339f 100644
--- a/arch/s390/kernel/swsusp_asm64.S
+++ b/arch/s390/kernel/swsusp_asm64.S
@@ -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
@@ -200,8 +213,11 @@ restart_suspend:
200 213
201restore_registers: 214restore_registers:
202 /* Restore registers */ 215 /* Restore registers */
203 lghi %r13,0x1000 /* %r1 = pointer to save arae */ 216 lghi %r13,0x1000 /* %r1 = pointer to save area */
204 217
218 /* Ignore time spent in suspended state. */
219 llgf %r1,0x318(%r13)
220 stck __LC_LAST_UPDATE_CLOCK(%r1)
205 spt 0x328(%r13) /* reprogram timer */ 221 spt 0x328(%r13) /* reprogram timer */
206 //sckc 0x330(%r13) /* set clock comparator */ 222 //sckc 0x330(%r13) /* set clock comparator */
207 223
@@ -229,9 +245,6 @@ restore_registers:
229 /* Load old stack */ 245 /* Load old stack */
230 lg %r15,0x2f8(%r13) 246 lg %r15,0x2f8(%r13)
231 247
232 /* Pointer to save area */
233 lghi %r13,0x1000
234
235 /* Restore prefix register */ 248 /* Restore prefix register */
236 spx 0x318(%r13) 249 spx 0x318(%r13)
237 250