timex.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1998, 1999, 2003 by Ralf Baechle
  7. */
  8. #ifndef _ASM_TIMEX_H
  9. #define _ASM_TIMEX_H
  10. #ifdef __KERNEL__
  11. #include <asm/mipsregs.h>
  12. /*
  13. * This is the clock rate of the i8253 PIT. A MIPS system may not have
  14. * a PIT by the symbol is used all over the kernel including some APIs.
  15. * So keeping it defined to the number for the PIT is the only sane thing
  16. * for now.
  17. */
  18. #define CLOCK_TICK_RATE 1193182
  19. /*
  20. * Standard way to access the cycle counter.
  21. * Currently only used on SMP for scheduling.
  22. *
  23. * Only the low 32 bits are available as a continuously counting entity.
  24. * But this only means we'll force a reschedule every 8 seconds or so,
  25. * which isn't an evil thing.
  26. *
  27. * We know that all SMP capable CPUs have cycle counters.
  28. */
  29. typedef unsigned int cycles_t;
  30. static inline cycles_t get_cycles(void)
  31. {
  32. return 0;
  33. }
  34. #endif /* __KERNEL__ */
  35. #endif /* _ASM_TIMEX_H */