162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * arch/arm/include/asm/timex.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 1997,1998 Russell King 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Architecture Specific TIME specifications 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci#ifndef _ASMARM_TIMEX_H 1062306a36Sopenharmony_ci#define _ASMARM_TIMEX_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_citypedef unsigned long cycles_t; 1362306a36Sopenharmony_ci#define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; }) 1462306a36Sopenharmony_ci#define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback()) 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#endif 17