1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
4 */
5#ifndef _ASM_TIMEX_H
6#define _ASM_TIMEX_H
7
8#ifdef __KERNEL__
9
10#include <linux/compiler.h>
11
12#include <asm/cpu.h>
13#include <asm/cpu-features.h>
14
15typedef unsigned long cycles_t;
16
17#define get_cycles get_cycles
18
19static inline cycles_t get_cycles(void)
20{
21	return drdtime();
22}
23
24#endif /* __KERNEL__ */
25
26#endif /*  _ASM_TIMEX_H */
27