hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/x86/include/asm/timex.h
....@@ -5,6 +5,15 @@
55 #include <asm/processor.h>
66 #include <asm/tsc.h>
77
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
+
817 /* Assume we use the PIT time source for the clock tick */
918 #define CLOCK_TICK_RATE PIT_TICK_RATE
1019