Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
1965aae3 PA |
2 | #ifndef _ASM_X86_TIMEX_H |
3 | #define _ASM_X86_TIMEX_H | |
2f0798a3 TG |
4 | |
5 | #include <asm/processor.h> | |
6 | #include <asm/tsc.h> | |
7 | ||
3bd4abc0 JD |
8 | static inline unsigned long random_get_entropy(void) |
9 | { | |
10 | if (!IS_ENABLED(CONFIG_X86_TSC) && | |
11 | !cpu_feature_enabled(X86_FEATURE_TSC)) | |
12 | return random_get_entropy_fallback(); | |
13 | return rdtsc(); | |
14 | } | |
15 | #define random_get_entropy random_get_entropy | |
16 | ||
08604bd9 | 17 | /* Assume we use the PIT time source for the clock tick */ |
e1b4d114 | 18 | #define CLOCK_TICK_RATE PIT_TICK_RATE |
2f0798a3 | 19 | |
941e492b | 20 | #define ARCH_HAS_READ_CURRENT_TIMER |
2f0798a3 | 21 | |
1965aae3 | 22 | #endif /* _ASM_X86_TIMEX_H */ |