Commit 76d4e00a05d06c1d1552adea24fcf6182c9d8999
1 parent
7aa79f9487
Exists in
master
and in
7 other branches
[S390] merge cpu.h into cputime.h
All definition in cpu.h have to do with cputime accounting. Move them to cputime.h and remove the header file. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Showing 7 changed files with 24 additions and 37 deletions Side-by-side Diff
arch/s390/include/asm/cpu.h
1 | -/* | |
2 | - * include/asm-s390/cpu.h | |
3 | - * | |
4 | - * Copyright IBM Corp. 2007 | |
5 | - * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> | |
6 | - */ | |
7 | - | |
8 | -#ifndef _ASM_S390_CPU_H_ | |
9 | -#define _ASM_S390_CPU_H_ | |
10 | - | |
11 | -#include <linux/types.h> | |
12 | -#include <linux/percpu.h> | |
13 | -#include <linux/spinlock.h> | |
14 | - | |
15 | -struct s390_idle_data { | |
16 | - spinlock_t lock; | |
17 | - unsigned long long idle_count; | |
18 | - unsigned long long idle_enter; | |
19 | - unsigned long long idle_time; | |
20 | -}; | |
21 | - | |
22 | -DECLARE_PER_CPU(struct s390_idle_data, s390_idle); | |
23 | - | |
24 | -void vtime_start_cpu(void); | |
25 | - | |
26 | -static inline void s390_idle_check(void) | |
27 | -{ | |
28 | - if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL) | |
29 | - vtime_start_cpu(); | |
30 | -} | |
31 | - | |
32 | -#endif /* _ASM_S390_CPU_H_ */ |
arch/s390/include/asm/cputime.h
... | ... | @@ -9,6 +9,9 @@ |
9 | 9 | #ifndef _S390_CPUTIME_H |
10 | 10 | #define _S390_CPUTIME_H |
11 | 11 | |
12 | +#include <linux/types.h> | |
13 | +#include <linux/percpu.h> | |
14 | +#include <linux/spinlock.h> | |
12 | 15 | #include <asm/div64.h> |
13 | 16 | |
14 | 17 | /* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ |
15 | 18 | |
... | ... | @@ -174,9 +177,25 @@ |
174 | 177 | return __div(cputime, 4096000000ULL / USER_HZ); |
175 | 178 | } |
176 | 179 | |
180 | +struct s390_idle_data { | |
181 | + spinlock_t lock; | |
182 | + unsigned long long idle_count; | |
183 | + unsigned long long idle_enter; | |
184 | + unsigned long long idle_time; | |
185 | +}; | |
186 | + | |
187 | +DECLARE_PER_CPU(struct s390_idle_data, s390_idle); | |
188 | + | |
189 | +void vtime_start_cpu(void); | |
177 | 190 | cputime64_t s390_get_idle_time(int cpu); |
178 | 191 | |
179 | 192 | #define arch_idle_time(cpu) s390_get_idle_time(cpu) |
193 | + | |
194 | +static inline void s390_idle_check(void) | |
195 | +{ | |
196 | + if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL) | |
197 | + vtime_start_cpu(); | |
198 | +} | |
180 | 199 | |
181 | 200 | #endif /* _S390_CPUTIME_H */ |
arch/s390/kernel/nmi.c
arch/s390/kernel/s390_ext.c
arch/s390/kernel/smp.c
arch/s390/kernel/vtime.c
drivers/s390/cio/cio.c