From 27f6b416626a240e1b46f646d2e0c5266f4eac95 Mon Sep 17 00:00:00 2001 From: Martin Schwidefsky Date: Fri, 20 Jul 2012 11:15:08 +0200 Subject: s390/vtimer: rework virtual timer interface The current virtual timer interface is inherently per-cpu and hard to use. The sole user of the interface is appldata which uses it to execute a function after a specific amount of cputime has been used over all cpus. Rework the virtual timer interface to hook into the cputime accounting. This makes the interface independent from the CPU timer interrupts, and makes the virtual timers global as opposed to per-cpu. Overall the code is greatly simplified. The downside is that the accuracy is not as good as the original implementation, but it is still good enough for appldata. Reviewed-by: Jan Glauber Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/cputime.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch/s390/include/asm/cputime.h') diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 357ea7b9714e..8709bdef233c 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h @@ -168,9 +168,11 @@ struct s390_idle_data { int nohz_delay; unsigned int sequence; unsigned long long idle_count; - unsigned long long idle_enter; - unsigned long long idle_exit; unsigned long long idle_time; + unsigned long long clock_idle_enter; + unsigned long long clock_idle_exit; + unsigned long long timer_idle_enter; + unsigned long long timer_idle_exit; }; DECLARE_PER_CPU(struct s390_idle_data, s390_idle); -- cgit v1.2.3-59-g8ed1b