aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2017-03-01 03:16:03 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-03-01 03:59:27 -0500
commite69ca822ce0ed3ba006ce384d7d205c81d92373f (patch)
treed985d185fa8e763ce743ad9c2b0e7cd1008f01d7
parentd9fcf2a1cbd1ff65d0109b1b400938808007fcd5 (diff)
s390/cputime: remove last traces of cputime_t
The cputime_t type is a thing of the past, replace the last occurences of the type in the s390 code with a simple u64. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/include/asm/cputime.h14
-rw-r--r--arch/s390/kernel/vtime.c2
2 files changed, 3 insertions, 13 deletions
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
index d1c407ddf703..e5672d6276a6 100644
--- a/arch/s390/include/asm/cputime.h
+++ b/arch/s390/include/asm/cputime.h
@@ -8,32 +8,22 @@
8#define _S390_CPUTIME_H 8#define _S390_CPUTIME_H
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11#include <asm/div64.h>
12 11
13#define CPUTIME_PER_USEC 4096ULL 12#define CPUTIME_PER_USEC 4096ULL
14#define CPUTIME_PER_SEC (CPUTIME_PER_USEC * USEC_PER_SEC) 13#define CPUTIME_PER_SEC (CPUTIME_PER_USEC * USEC_PER_SEC)
15 14
16/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ 15/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */
17 16
18typedef unsigned long long __nocast cputime_t;
19typedef unsigned long long __nocast cputime64_t;
20
21#define cmpxchg_cputime(ptr, old, new) cmpxchg64(ptr, old, new) 17#define cmpxchg_cputime(ptr, old, new) cmpxchg64(ptr, old, new)
22 18
23static inline unsigned long __div(unsigned long long n, unsigned long base)
24{
25 return n / base;
26}
27
28/* 19/*
29 * Convert cputime to microseconds and back. 20 * Convert cputime to microseconds and back.
30 */ 21 */
31static inline unsigned int cputime_to_usecs(const cputime_t cputime) 22static inline u64 cputime_to_usecs(const u64 cputime)
32{ 23{
33 return (__force unsigned long long) cputime >> 12; 24 return cputime >> 12;
34} 25}
35 26
36
37u64 arch_cpu_idle_time(int cpu); 27u64 arch_cpu_idle_time(int cpu);
38 28
39#define arch_idle_time(cpu) arch_cpu_idle_time(cpu) 29#define arch_idle_time(cpu) arch_cpu_idle_time(cpu)
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 31bd96e81167..8f5f59a151b4 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -111,7 +111,7 @@ static inline u64 scale_vtime(u64 vtime)
111} 111}
112 112
113static void account_system_index_scaled(struct task_struct *p, 113static void account_system_index_scaled(struct task_struct *p,
114 cputime_t cputime, cputime_t scaled, 114 u64 cputime, u64 scaled,
115 enum cpu_usage_stat index) 115 enum cpu_usage_stat index)
116{ 116{
117 p->stimescaled += cputime_to_nsecs(scaled); 117 p->stimescaled += cputime_to_nsecs(scaled);