GNU Linux-libre 4.9.333-gnu1
[releases.git] / arch / x86 / include / asm / timex.h
1 #ifndef _ASM_X86_TIMEX_H
2 #define _ASM_X86_TIMEX_H
3
4 #include <asm/processor.h>
5 #include <asm/tsc.h>
6
7 static inline unsigned long random_get_entropy(void)
8 {
9         if (!IS_ENABLED(CONFIG_X86_TSC) &&
10             !cpu_feature_enabled(X86_FEATURE_TSC))
11                 return random_get_entropy_fallback();
12         return rdtsc();
13 }
14 #define random_get_entropy random_get_entropy
15
16 /* Assume we use the PIT time source for the clock tick */
17 #define CLOCK_TICK_RATE         PIT_TICK_RATE
18
19 #define ARCH_HAS_READ_CURRENT_TIMER
20
21 #endif /* _ASM_X86_TIMEX_H */