Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_X86_TIMEX_H
0003 #define _ASM_X86_TIMEX_H
0004 
0005 #include <asm/processor.h>
0006 #include <asm/tsc.h>
0007 
0008 static inline unsigned long random_get_entropy(void)
0009 {
0010     if (!IS_ENABLED(CONFIG_X86_TSC) &&
0011         !cpu_feature_enabled(X86_FEATURE_TSC))
0012         return random_get_entropy_fallback();
0013     return rdtsc();
0014 }
0015 #define random_get_entropy random_get_entropy
0016 
0017 /* Assume we use the PIT time source for the clock tick */
0018 #define CLOCK_TICK_RATE     PIT_TICK_RATE
0019 
0020 #define ARCH_HAS_READ_CURRENT_TIMER
0021 
0022 #endif /* _ASM_X86_TIMEX_H */