patch-2.4.22 linux-2.4.22/include/asm-mips64/timex.h
Next file: linux-2.4.22/include/asm-mips64/tlbdebug.h
Previous file: linux-2.4.22/include/asm-mips64/time.h
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/include/asm-mips64/timex.h
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.21/include/asm-mips64/timex.h linux-2.4.22/include/asm-mips64/timex.h
@@ -3,18 +3,14 @@
* 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_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>
/*
* Standard way to access the cycle counter.
@@ -32,15 +28,7 @@
static inline cycles_t get_cycles (void)
{
- cycles_t val;
-
- __asm__ __volatile__(
- ".set noreorder\n\t"
- "mfc0 %0, $9\n\t"
- ".set reorder"
- : "=r" (val));
-
- return val;
+ return read_c0_count();
}
#define vxtime_lock() do {} while (0)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)