patch-2.4.22 linux-2.4.22/include/asm-mips/timex.h
Next file: linux-2.4.22/include/asm-mips/tlbdebug.h
Previous file: linux-2.4.22/include/asm-mips/time.h
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/include/asm-mips/timex.h
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.21/include/asm-mips/timex.h linux-2.4.22/include/asm-mips/timex.h
@@ -3,20 +3,15 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1998, 1999 by Ralf Baechle
+ * Copyright (C) 1998, 1999, 2003 by Ralf Baechle
*
* FIXME: For some of the supported machines this is dead wrong.
*/
-#ifndef __ASM_MIPS_TIMEX_H
-#define __ASM_MIPS_TIMEX_H
+#ifndef _ASM_TIMEX_H
+#define _ASM_TIMEX_H
-#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
-#define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */
-#define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \
- (1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \
- << (SHIFT_SCALE-SHIFT_HZ)) / HZ)
+#include <asm/mipsregs.h>
-#ifdef __KERNEL__
/*
* Standard way to access the cycle counter.
* Currently only used on SMP for scheduling.
@@ -33,11 +28,10 @@
static inline cycles_t get_cycles (void)
{
- return read_32bit_cp0_register(CP0_COUNT);
+ return read_c0_count();
}
-#endif /* __KERNEL__ */
#define vxtime_lock() do {} while (0)
#define vxtime_unlock() do {} while (0)
-#endif /* __ASM_MIPS_TIMEX_H */
+#endif /* _ASM_TIMEX_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)