xref: /linux/arch/x86/include/asm/timex.h (revision 056a5087d87ead77dedbe9cf5bde53b7cd4b4651)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_TIMEX_H
3 #define _ASM_X86_TIMEX_H
4 
5 #include <asm/processor.h>
6 #include <asm/tsc.h>
7 
8 static inline unsigned long random_get_entropy(void)
9 {
10 	if (!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 */
22