diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-03-11 11:59:27 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-03-11 11:59:28 -0400 |
commit | 4c1051e37a0e2a941115c6fb7ba08c318f25a0f9 (patch) | |
tree | f228f1a90c0d7abb8308f275d0906dd7d1588ba3 /arch/s390/kernel/process.c | |
parent | 8b646bd759086f6090fe27acf414c0b5faa737f4 (diff) |
[S390] rework idle code
Whenever the cpu loads an enabled wait PSW it will appear as idle to the
underlying host system. The code in default_idle calls vtime_stop_cpu
which does the necessary voodoo to get the cpu time accounting right.
The udelay code just loads an enabled wait PSW. To correct this rework
the vtime_stop_cpu/vtime_start_cpu logic and move the difficult parts
to entry[64].S, vtime_stop_cpu can now be called from anywhere and
vtime_start_cpu is gone. The correction of the cpu time during wakeup
from an enabled wait PSW is done with a critical section in entry[64].S.
As vtime_start_cpu is gone, s390_idle_check can be removed as well.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r-- | arch/s390/kernel/process.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index e795933eb2cb..78b3c149b8b6 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -77,13 +77,8 @@ static void default_idle(void) | |||
77 | local_irq_enable(); | 77 | local_irq_enable(); |
78 | return; | 78 | return; |
79 | } | 79 | } |
80 | trace_hardirqs_on(); | 80 | /* Halt the cpu and keep track of cpu time accounting. */ |
81 | /* Don't trace preempt off for idle. */ | ||
82 | stop_critical_timings(); | ||
83 | /* Stop virtual timer and halt the cpu. */ | ||
84 | vtime_stop_cpu(); | 81 | vtime_stop_cpu(); |
85 | /* Reenable preemption tracer. */ | ||
86 | start_critical_timings(); | ||
87 | } | 82 | } |
88 | 83 | ||
89 | void cpu_idle(void) | 84 | void cpu_idle(void) |