diff options
| author | Frederic Weisbecker <fweisbec@gmail.com> | 2017-01-30 22:09:43 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-02-01 03:14:00 -0500 |
| commit | f22d6df0b23e66b6d9058e2570402606a6ad069a (patch) | |
| tree | 387793f34ba905fb57f04539597c3b77d7760ab2 /include/asm-generic | |
| parent | bfce1d6006f383fbb55a89580af37819a77195b7 (diff) | |
sched/cputime: Remove jiffies based cputime
This cputime_t implementation is now unused, we can remove it.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Link: http://lkml.kernel.org/r/1485832191-26889-28-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/cputime.h | 4 | ||||
| -rw-r--r-- | include/asm-generic/cputime_jiffies.h | 75 |
2 files changed, 0 insertions, 79 deletions
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h index 51969436b8b8..8a624b454ba3 100644 --- a/include/asm-generic/cputime.h +++ b/include/asm-generic/cputime.h | |||
| @@ -4,10 +4,6 @@ | |||
| 4 | #include <linux/time.h> | 4 | #include <linux/time.h> |
| 5 | #include <linux/jiffies.h> | 5 | #include <linux/jiffies.h> |
| 6 | 6 | ||
| 7 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | ||
| 8 | # include <asm-generic/cputime_jiffies.h> | ||
| 9 | #endif | ||
| 10 | |||
| 11 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN | 7 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN |
| 12 | # include <asm-generic/cputime_nsecs.h> | 8 | # include <asm-generic/cputime_nsecs.h> |
| 13 | #endif | 9 | #endif |
diff --git a/include/asm-generic/cputime_jiffies.h b/include/asm-generic/cputime_jiffies.h deleted file mode 100644 index 6bb8cd45f53b..000000000000 --- a/include/asm-generic/cputime_jiffies.h +++ /dev/null | |||
| @@ -1,75 +0,0 @@ | |||
| 1 | #ifndef _ASM_GENERIC_CPUTIME_JIFFIES_H | ||
| 2 | #define _ASM_GENERIC_CPUTIME_JIFFIES_H | ||
| 3 | |||
| 4 | typedef unsigned long __nocast cputime_t; | ||
| 5 | |||
| 6 | #define cmpxchg_cputime(ptr, old, new) cmpxchg(ptr, old, new) | ||
| 7 | |||
| 8 | #define cputime_one_jiffy jiffies_to_cputime(1) | ||
| 9 | #define cputime_to_jiffies(__ct) (__force unsigned long)(__ct) | ||
| 10 | #define jiffies_to_cputime(__hz) (__force cputime_t)(__hz) | ||
| 11 | |||
| 12 | typedef u64 __nocast cputime64_t; | ||
| 13 | |||
| 14 | #define cputime64_to_jiffies64(__ct) (__force u64)(__ct) | ||
| 15 | #define jiffies64_to_cputime64(__jif) (__force cputime64_t)(__jif) | ||
| 16 | |||
| 17 | |||
| 18 | /* | ||
| 19 | * Convert nanoseconds <-> cputime | ||
| 20 | */ | ||
| 21 | #define cputime_to_nsecs(__ct) \ | ||
| 22 | jiffies_to_nsecs(cputime_to_jiffies(__ct)) | ||
| 23 | #define nsecs_to_cputime64(__nsec) \ | ||
| 24 | jiffies64_to_cputime64(nsecs_to_jiffies64(__nsec)) | ||
| 25 | #define nsecs_to_cputime(__nsec) \ | ||
| 26 | jiffies_to_cputime(nsecs_to_jiffies(__nsec)) | ||
| 27 | |||
| 28 | |||
| 29 | /* | ||
| 30 | * Convert cputime to microseconds and back. | ||
| 31 | */ | ||
| 32 | #define cputime_to_usecs(__ct) \ | ||
| 33 | jiffies_to_usecs(cputime_to_jiffies(__ct)) | ||
| 34 | #define usecs_to_cputime(__usec) \ | ||
| 35 | jiffies_to_cputime(usecs_to_jiffies(__usec)) | ||
| 36 | #define usecs_to_cputime64(__usec) \ | ||
| 37 | jiffies64_to_cputime64(nsecs_to_jiffies64((__usec) * 1000)) | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Convert cputime to seconds and back. | ||
| 41 | */ | ||
| 42 | #define cputime_to_secs(jif) (cputime_to_jiffies(jif) / HZ) | ||
| 43 | #define secs_to_cputime(sec) jiffies_to_cputime((sec) * HZ) | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Convert cputime to timespec and back. | ||
| 47 | */ | ||
| 48 | #define timespec_to_cputime(__val) \ | ||
| 49 | jiffies_to_cputime(timespec_to_jiffies(__val)) | ||
| 50 | #define cputime_to_timespec(__ct,__val) \ | ||
| 51 | jiffies_to_timespec(cputime_to_jiffies(__ct),__val) | ||
| 52 | |||
| 53 | /* | ||
| 54 | * Convert cputime to timeval and back. | ||
| 55 | */ | ||
| 56 | #define timeval_to_cputime(__val) \ | ||
| 57 | jiffies_to_cputime(timeval_to_jiffies(__val)) | ||
| 58 | #define cputime_to_timeval(__ct,__val) \ | ||
| 59 | jiffies_to_timeval(cputime_to_jiffies(__ct),__val) | ||
| 60 | |||
| 61 | /* | ||
| 62 | * Convert cputime to clock and back. | ||
| 63 | */ | ||
| 64 | #define cputime_to_clock_t(__ct) \ | ||
| 65 | jiffies_to_clock_t(cputime_to_jiffies(__ct)) | ||
| 66 | #define clock_t_to_cputime(__x) \ | ||
| 67 | jiffies_to_cputime(clock_t_to_jiffies(__x)) | ||
| 68 | |||
| 69 | /* | ||
| 70 | * Convert cputime64 to clock. | ||
| 71 | */ | ||
| 72 | #define cputime64_to_clock_t(__ct) \ | ||
| 73 | jiffies_64_to_clock_t(cputime64_to_jiffies64(__ct)) | ||
| 74 | |||
| 75 | #endif | ||
