0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _S390_CPUTIME_H
0009 #define _S390_CPUTIME_H
0010
0011 #include <linux/types.h>
0012 #include <asm/timex.h>
0013
0014 #define CPUTIME_PER_USEC 4096ULL
0015 #define CPUTIME_PER_SEC (CPUTIME_PER_USEC * USEC_PER_SEC)
0016
0017
0018
0019 #define cmpxchg_cputime(ptr, old, new) cmpxchg64(ptr, old, new)
0020
0021
0022
0023
0024 static inline u64 cputime_to_usecs(const u64 cputime)
0025 {
0026 return cputime >> 12;
0027 }
0028
0029
0030
0031
0032 #define cputime_to_nsecs(cputime) tod_to_ns(cputime)
0033
0034 u64 arch_cpu_idle_time(int cpu);
0035
0036 #define arch_idle_time(cpu) arch_cpu_idle_time(cpu)
0037
0038 void account_idle_time_irq(void);
0039
0040 #endif