source:
freewrt/target/linux/ar7-2.4/patches/006-sched_use_tsc.patch@
a3abab6
| Last change on this file since a3abab6 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 2.1 KB | |
-
arch/mips/kernel/time.c
diff -urN linux.old/arch/mips/kernel/time.c linux.dev/arch/mips/kernel/time.c
old new 151 151 unsigned int (*mips_hpt_read)(void); 152 152 void (*mips_hpt_init)(unsigned int); 153 153 154 extern __u32 get_htscl(void) 155 { 156 return timerhi; 157 } 158 159 static __u64 tscll_last = 0; 160 161 extern __u64 get_tscll(void) 162 { 163 __u64 h = (__u64) timerhi; 164 __u32 c = read_c0_count(); 165 166 h <<= 32; 167 h += c; 168 169 while (h < tscll_last) 170 h += (((__u64) 1) << 32); 171 172 tscll_last = h; 173 return h; 174 } 154 175 155 176 /* 156 177 * timeofday services, for syscalls. … … 761 782 EXPORT_SYMBOL(to_tm); 762 783 EXPORT_SYMBOL(rtc_set_time); 763 784 EXPORT_SYMBOL(rtc_get_time); 785 EXPORT_SYMBOL(get_htscl); 786 EXPORT_SYMBOL(get_tscll); -
include/asm-mips/timex.h
diff -urN linux.old/include/asm-mips/timex.h linux.dev/include/asm-mips/timex.h
old new 31 31 return read_c0_count(); 32 32 } 33 33 34 extern __u32 get_htscl(void); 35 extern __u64 get_tscll(void); 36 37 #define rdtsc(low, high) \ 38 high = get_htscl(); \ 39 low = read_c0_count(); 40 41 #define rdtscl(low) \ 42 low = read_c0_count(); 43 44 #define rdtscll(val) \ 45 val = get_tscll(); 46 34 47 #define vxtime_lock() do {} while (0) 35 48 #define vxtime_unlock() do {} while (0) 36 49 -
include/net/pkt_sched.h
diff -urN linux.old/include/net/pkt_sched.h linux.dev/include/net/pkt_sched.h
old new 5 5 #define PSCHED_JIFFIES 2 6 6 #define PSCHED_CPU 3 7 7 8 #ifdef __mips__ 9 #define PSCHED_CLOCK_SOURCE PSCHED_CPU 10 #else 8 11 #define PSCHED_CLOCK_SOURCE PSCHED_JIFFIES 12 #endif 9 13 10 14 #include <linux/config.h> 11 15 #include <linux/types.h> … … 271 275 #define PSCHED_US2JIFFIE(delay) (((delay)+psched_clock_per_hz-1)/psched_clock_per_hz) 272 276 #define PSCHED_JIFFIE2US(delay) ((delay)*psched_clock_per_hz) 273 277 274 #if def CONFIG_X86_TSC278 #if defined(CONFIG_X86_TSC) || defined(__mips__) 275 279 276 280 #define PSCHED_GET_TIME(stamp) \ 277 281 ({ u64 __cur; \
Note:
See TracBrowser
for help on using the repository browser.
