timex.h 463 B

12345678910111213141516171819202122232425
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_POWERPC_TIMEX_H
  3. #define _ASM_POWERPC_TIMEX_H
  4. #ifdef __KERNEL__
  5. /*
  6. * PowerPC architecture timex specifications
  7. */
  8. #include <asm/cputable.h>
  9. #include <asm/vdso/timebase.h>
  10. #define CLOCK_TICK_RATE 1024000 /* Underlying HZ */
  11. typedef unsigned long cycles_t;
  12. static inline cycles_t get_cycles(void)
  13. {
  14. return mftb();
  15. }
  16. #define get_cycles get_cycles
  17. #endif /* __KERNEL__ */
  18. #endif /* _ASM_POWERPC_TIMEX_H */