xref: /linux/arch/arm/include/asm/timex.h (revision 59e6295fac26b8e85c1ea859cdd89fa1e47519d7)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  *  arch/arm/include/asm/timex.h
4  *
5  *  Copyright (C) 1997,1998 Russell King
6  *
7  *  Architecture Specific TIME specifications
8  */
9 #ifndef _ASMARM_TIMEX_H
10 #define _ASMARM_TIMEX_H
11 
12 typedef unsigned long cycles_t;
13 // Temporary workaround until timex.h is cleaned up
14 bool delay_read_timer(unsigned long *t);
15 
16 #define get_cycles()	({ cycles_t c; delay_read_timer(&c) ? 0 : c; })
17 #define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback())
18 
19 #endif
20