Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Russell King | 112f38a4 | 2010-12-15 19:23:07 +0000 | [diff] [blame] | 2 | /* |
| 3 | * sched_clock.h: support for extending counters to full 64-bit ns counter |
Russell King | 112f38a4 | 2010-12-15 19:23:07 +0000 | [diff] [blame] | 4 | */ |
Stephen Boyd | 38ff87f | 2013-06-01 23:39:40 -0700 | [diff] [blame] | 5 | #ifndef LINUX_SCHED_CLOCK |
| 6 | #define LINUX_SCHED_CLOCK |
Russell King | 112f38a4 | 2010-12-15 19:23:07 +0000 | [diff] [blame] | 7 | |
Stephen Boyd | 38ff87f | 2013-06-01 23:39:40 -0700 | [diff] [blame] | 8 | #ifdef CONFIG_GENERIC_SCHED_CLOCK |
Pavel Tatashin | 5d2a4e9 | 2018-07-19 16:55:41 -0400 | [diff] [blame] | 9 | extern void generic_sched_clock_init(void); |
Stephen Boyd | 38ff87f | 2013-06-01 23:39:40 -0700 | [diff] [blame] | 10 | |
Stephen Boyd | e7e3ff1 | 2013-07-18 16:21:17 -0700 | [diff] [blame] | 11 | extern void sched_clock_register(u64 (*read)(void), int bits, |
| 12 | unsigned long rate); |
Daniel Lezcano | 364eba4 | 2015-10-29 18:33:47 +0100 | [diff] [blame] | 13 | #else |
Pavel Tatashin | 5d2a4e9 | 2018-07-19 16:55:41 -0400 | [diff] [blame] | 14 | static inline void generic_sched_clock_init(void) { } |
Daniel Lezcano | 364eba4 | 2015-10-29 18:33:47 +0100 | [diff] [blame] | 15 | |
| 16 | static inline void sched_clock_register(u64 (*read)(void), int bits, |
| 17 | unsigned long rate) |
| 18 | { |
Daniel Lezcano | 364eba4 | 2015-10-29 18:33:47 +0100 | [diff] [blame] | 19 | } |
| 20 | #endif |
Russell King | 211baa70 | 2011-01-11 16:23:04 +0000 | [diff] [blame] | 21 | |
Russell King | 112f38a4 | 2010-12-15 19:23:07 +0000 | [diff] [blame] | 22 | #endif |