forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
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