timex.h 436 B

1234567891011121314151617181920212223242526
  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. #ifdef __KERNEL__
  8. #include <linux/compiler.h>
  9. #include <asm/cpu.h>
  10. #include <asm/cpu-features.h>
  11. typedef unsigned long cycles_t;
  12. #define get_cycles get_cycles
  13. static inline cycles_t get_cycles(void)
  14. {
  15. return drdtime();
  16. }
  17. #endif /* __KERNEL__ */
  18. #endif /* _ASM_TIMEX_H */