1 Index: linux-2.4.35.4/arch/mips/kernel/time.c
2 ===================================================================
3 --- linux-2.4.35.4.orig/arch/mips/kernel/time.c 2007-12-15 05:19:41.138765402 +0100
4 +++ linux-2.4.35.4/arch/mips/kernel/time.c 2007-12-15 05:19:55.011555967 +0100
6 unsigned int (*mips_hpt_read)(void);
7 void (*mips_hpt_init)(unsigned int);
9 +extern __u32 get_htscl(void)
14 +static __u64 tscll_last = 0;
16 +extern __u64 get_tscll(void)
18 + __u64 h = (__u64) timerhi;
19 + __u32 c = read_c0_count();
24 + while (h < tscll_last)
25 + h += (((__u64) 1) << 32);
32 * timeofday services, for syscalls.
35 EXPORT_SYMBOL(rtc_set_time);
36 EXPORT_SYMBOL(rtc_get_time);
37 +EXPORT_SYMBOL(get_htscl);
38 +EXPORT_SYMBOL(get_tscll);
39 Index: linux-2.4.35.4/include/asm-mips/timex.h
40 ===================================================================
41 --- linux-2.4.35.4.orig/include/asm-mips/timex.h 2007-12-15 05:19:41.146765860 +0100
42 +++ linux-2.4.35.4/include/asm-mips/timex.h 2007-12-15 05:19:55.015556197 +0100
44 return read_c0_count();
47 +extern __u32 get_htscl(void);
48 +extern __u64 get_tscll(void);
50 +#define rdtsc(low, high) \
51 + high = get_htscl(); \
52 + low = read_c0_count();
54 +#define rdtscl(low) \
55 + low = read_c0_count();
57 +#define rdtscll(val) \
60 #define vxtime_lock() do {} while (0)
61 #define vxtime_unlock() do {} while (0)
63 Index: linux-2.4.35.4/include/net/pkt_sched.h
64 ===================================================================
65 --- linux-2.4.35.4.orig/include/net/pkt_sched.h 2007-12-15 05:19:41.154766315 +0100
66 +++ linux-2.4.35.4/include/net/pkt_sched.h 2007-12-15 05:19:55.023556652 +0100
68 #define PSCHED_JIFFIES 2
72 +#define PSCHED_CLOCK_SOURCE PSCHED_CPU
74 #define PSCHED_CLOCK_SOURCE PSCHED_JIFFIES
77 #include <linux/config.h>
78 #include <linux/types.h>
80 #define PSCHED_US2JIFFIE(delay) (((delay)+psched_clock_per_hz-1)/psched_clock_per_hz)
81 #define PSCHED_JIFFIE2US(delay) ((delay)*psched_clock_per_hz)
83 -#ifdef CONFIG_X86_TSC
84 +#if defined(CONFIG_X86_TSC) || defined(__mips__)
86 #define PSCHED_GET_TIME(stamp) \