]>
git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blob - arch/s390/include/asm/cputime.h
2 * Copyright IBM Corp. 2004
4 * Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
7 #ifndef _S390_CPUTIME_H
8 #define _S390_CPUTIME_H
10 #include <linux/types.h>
11 #include <asm/div64.h>
13 #define CPUTIME_PER_USEC 4096ULL
14 #define CPUTIME_PER_SEC (CPUTIME_PER_USEC * USEC_PER_SEC)
16 /* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */
18 typedef unsigned long long __nocast cputime_t
;
19 typedef unsigned long long __nocast cputime64_t
;
21 #define cmpxchg_cputime(ptr, old, new) cmpxchg64(ptr, old, new)
23 static inline unsigned long __div(unsigned long long n
, unsigned long base
)
29 * Convert cputime to microseconds and back.
31 static inline unsigned int cputime_to_usecs(const cputime_t cputime
)
33 return (__force
unsigned long long) cputime
>> 12;
37 u64
arch_cpu_idle_time(int cpu
);
39 #define arch_idle_time(cpu) arch_cpu_idle_time(cpu)
41 #endif /* _S390_CPUTIME_H */