1 diff -urN linux.old/arch/mips/kernel/time.c linux.dev/arch/mips/kernel/time.c
2 --- linux.old/arch/mips/kernel/time.c 2005-11-14 11:06:38.661262000 +0100
3 +++ linux.dev/arch/mips/kernel/time.c 2005-11-15 20:02:50.059676750 +0100
5 unsigned int (*mips_hpt_read)(void);
6 void (*mips_hpt_init)(unsigned int);
8 +extern __u32 get_htscl(void)
13 +static __u64 tscll_last = 0;
15 +extern __u64 get_tscll(void)
17 + __u64 h = (__u64) timerhi;
18 + __u32 c = read_c0_count();
23 + while (h < tscll_last)
24 + h += (((__u64) 1) << 32);
31 * timeofday services, for syscalls.
34 EXPORT_SYMBOL(rtc_set_time);
35 EXPORT_SYMBOL(rtc_get_time);
36 +EXPORT_SYMBOL(get_htscl);
37 +EXPORT_SYMBOL(get_tscll);
38 diff -urN linux.old/include/asm-mips/timex.h linux.dev/include/asm-mips/timex.h
39 --- linux.old/include/asm-mips/timex.h 2005-11-14 11:06:38.685263500 +0100
40 +++ linux.dev/include/asm-mips/timex.h 2005-11-14 11:02:21.069163500 +0100
42 return read_c0_count();
45 +extern __u32 get_htscl(void);
46 +extern __u64 get_tscll(void);
48 +#define rdtsc(low, high) \
49 + high = get_htscl(); \
50 + low = read_c0_count();
52 +#define rdtscl(low) \
53 + low = read_c0_count();
55 +#define rdtscll(val) \
58 #define vxtime_lock() do {} while (0)
59 #define vxtime_unlock() do {} while (0)
61 diff -urN linux.old/include/net/pkt_sched.h linux.dev/include/net/pkt_sched.h
62 --- linux.old/include/net/pkt_sched.h 2005-11-14 11:06:38.709265000 +0100
63 +++ linux.dev/include/net/pkt_sched.h 2005-11-14 11:02:21.069163500 +0100
65 #define PSCHED_JIFFIES 2
69 +#define PSCHED_CLOCK_SOURCE PSCHED_CPU
71 #define PSCHED_CLOCK_SOURCE PSCHED_JIFFIES
74 #include <linux/config.h>
75 #include <linux/types.h>
77 #define PSCHED_US2JIFFIE(delay) (((delay)+psched_clock_per_hz-1)/psched_clock_per_hz)
78 #define PSCHED_JIFFIE2US(delay) ((delay)*psched_clock_per_hz)
80 -#ifdef CONFIG_X86_TSC
81 +#if defined(CONFIG_X86_TSC) || defined(__mips__)
83 #define PSCHED_GET_TIME(stamp) \