timex.h (546B)
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 8static 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 17/* Assume we use the PIT time source for the clock tick */ 18#define CLOCK_TICK_RATE PIT_TICK_RATE 19 20#define ARCH_HAS_READ_CURRENT_TIMER 21 22#endif /* _ASM_X86_TIMEX_H */