aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2009-06-12 04:26:21 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-06-12 04:27:29 -0400
commit76d4e00a05d06c1d1552adea24fcf6182c9d8999 (patch)
tree932881ed89489a912fc4c3ab15b03290283d60e2 /arch/s390
parent7aa79f948749da7de3de0c427e9c9ee0ff595243 (diff)
[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>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/cpu.h32
-rw-r--r--arch/s390/include/asm/cputime.h19
-rw-r--r--arch/s390/kernel/nmi.c2
-rw-r--r--arch/s390/kernel/s390_ext.c2
-rw-r--r--arch/s390/kernel/smp.c2
-rw-r--r--arch/s390/kernel/vtime.c2
6 files changed, 23 insertions, 36 deletions
diff --git a/arch/s390/include/asm/cpu.h b/arch/s390/include/asm/cpu.h
deleted file mode 100644
index d60a2eefb17b..000000000000
--- a/arch/s390/include/asm/cpu.h
+++ /dev/null
@@ -1,32 +0,0 @@
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
15struct 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
22DECLARE_PER_CPU(struct s390_idle_data, s390_idle);
23
24void vtime_start_cpu(void);
25
26static 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_ */
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
index 941384fbd39c..ec917d42ee6d 100644
--- a/arch/s390/include/asm/cputime.h
+++ b/arch/s390/include/asm/cputime.h
@@ -9,6 +9,9 @@
9#ifndef _S390_CPUTIME_H 9#ifndef _S390_CPUTIME_H
10#define _S390_CPUTIME_H 10#define _S390_CPUTIME_H
11 11
12#include <linux/types.h>
13#include <linux/percpu.h>
14#include <linux/spinlock.h>
12#include <asm/div64.h> 15#include <asm/div64.h>
13 16
14/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ 17/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */
@@ -174,8 +177,24 @@ cputime64_to_clock_t(cputime64_t cputime)
174 return __div(cputime, 4096000000ULL / USER_HZ); 177 return __div(cputime, 4096000000ULL / USER_HZ);
175} 178}
176 179
180struct 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
187DECLARE_PER_CPU(struct s390_idle_data, s390_idle);
188
189void vtime_start_cpu(void);
177cputime64_t s390_get_idle_time(int cpu); 190cputime64_t s390_get_idle_time(int cpu);
178 191
179#define arch_idle_time(cpu) s390_get_idle_time(cpu) 192#define arch_idle_time(cpu) s390_get_idle_time(cpu)
180 193
194static inline void s390_idle_check(void)
195{
196 if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL)
197 vtime_start_cpu();
198}
199
181#endif /* _S390_CPUTIME_H */ 200#endif /* _S390_CPUTIME_H */
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c
index 28cf196ba775..015e27da40eb 100644
--- a/arch/s390/kernel/nmi.c
+++ b/arch/s390/kernel/nmi.c
@@ -16,7 +16,7 @@
16#include <asm/lowcore.h> 16#include <asm/lowcore.h>
17#include <asm/smp.h> 17#include <asm/smp.h>
18#include <asm/etr.h> 18#include <asm/etr.h>
19#include <asm/cpu.h> 19#include <asm/cputime.h>
20#include <asm/nmi.h> 20#include <asm/nmi.h>
21#include <asm/crw.h> 21#include <asm/crw.h>
22 22
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c
index a0d2d55d7fb3..6b0686d78fc7 100644
--- a/arch/s390/kernel/s390_ext.c
+++ b/arch/s390/kernel/s390_ext.c
@@ -13,7 +13,7 @@
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <asm/cpu.h> 16#include <asm/cputime.h>
17#include <asm/lowcore.h> 17#include <asm/lowcore.h>
18#include <asm/s390_ext.h> 18#include <asm/s390_ext.h>
19#include <asm/irq_regs.h> 19#include <asm/irq_regs.h>
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index a985a3ba4401..0af302ceac2d 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -47,7 +47,7 @@
47#include <asm/timer.h> 47#include <asm/timer.h>
48#include <asm/lowcore.h> 48#include <asm/lowcore.h>
49#include <asm/sclp.h> 49#include <asm/sclp.h>
50#include <asm/cpu.h> 50#include <asm/cputime.h>
51#include <asm/vdso.h> 51#include <asm/vdso.h>
52#include "entry.h" 52#include "entry.h"
53 53
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index c87f59bd8246..c8eb7255332b 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -23,7 +23,7 @@
23#include <asm/s390_ext.h> 23#include <asm/s390_ext.h>
24#include <asm/timer.h> 24#include <asm/timer.h>
25#include <asm/irq_regs.h> 25#include <asm/irq_regs.h>
26#include <asm/cpu.h> 26#include <asm/cputime.h>
27 27
28static ext_int_info_t ext_int_info_timer; 28static ext_int_info_t ext_int_info_timer;
29 29