18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  arch/arm/include/asm/timex.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci *  Copyright (C) 1997,1998 Russell King
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci *  Architecture Specific TIME specifications
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci#ifndef _ASMARM_TIMEX_H
108c2ecf20Sopenharmony_ci#define _ASMARM_TIMEX_H
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_citypedef unsigned long cycles_t;
138c2ecf20Sopenharmony_ci#define get_cycles()	({ cycles_t c; read_current_timer(&c) ? 0 : c; })
148c2ecf20Sopenharmony_ci#define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback())
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#endif
17