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/asm-offsets.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/asm-offsets.c')
-rw-r--r-- | arch/s390/kernel/asm-offsets.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index aeeaf896be9b..ed8c913db79e 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c | |||
@@ -8,6 +8,8 @@ | |||
8 | 8 | ||
9 | #include <linux/kbuild.h> | 9 | #include <linux/kbuild.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <asm/cputime.h> | ||
12 | #include <asm/timer.h> | ||
11 | #include <asm/vdso.h> | 13 | #include <asm/vdso.h> |
12 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
13 | #include <asm/system.h> | 15 | #include <asm/system.h> |
@@ -70,6 +72,12 @@ int main(void) | |||
70 | DEFINE(__CLOCK_MONOTONIC, CLOCK_MONOTONIC); | 72 | DEFINE(__CLOCK_MONOTONIC, CLOCK_MONOTONIC); |
71 | DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); | 73 | DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); |
72 | BLANK(); | 74 | BLANK(); |
75 | /* idle data offsets */ | ||
76 | DEFINE(__IDLE_ENTER, offsetof(struct s390_idle_data, idle_enter)); | ||
77 | DEFINE(__IDLE_EXIT, offsetof(struct s390_idle_data, idle_exit)); | ||
78 | /* vtimer queue offsets */ | ||
79 | DEFINE(__VQ_IDLE_ENTER, offsetof(struct vtimer_queue, idle_enter)); | ||
80 | DEFINE(__VQ_IDLE_EXIT, offsetof(struct vtimer_queue, idle_exit)); | ||
73 | /* lowcore offsets */ | 81 | /* lowcore offsets */ |
74 | DEFINE(__LC_EXT_PARAMS, offsetof(struct _lowcore, ext_params)); | 82 | DEFINE(__LC_EXT_PARAMS, offsetof(struct _lowcore, ext_params)); |
75 | DEFINE(__LC_EXT_CPU_ADDR, offsetof(struct _lowcore, ext_cpu_addr)); | 83 | DEFINE(__LC_EXT_CPU_ADDR, offsetof(struct _lowcore, ext_cpu_addr)); |