blob: 6d1337c169cd3c78fc1c227ea23d428ece28ab47 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * arch/arm/include/asm/timex.h
4 *
5 * Copyright (C) 1997,1998 Russell King
6 *
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00007 * Architecture Specific TIME specifications
8 */
9#ifndef _ASMARM_TIMEX_H
10#define _ASMARM_TIMEX_H
11
12typedef unsigned long cycles_t;
13#define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; })
Olivier Deprez92d4c212022-12-06 15:05:30 +010014#define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback())
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000015
16#endif