diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-11-15 14:48:10 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-11-15 14:48:10 +0000 |
commit | 5d78fad8c4ce7bb29041565bf25633a0f59f738b (patch) | |
tree | 6cdd85f66b79424d7e5008e84bb60a29c5480c1d | |
parent | d277a09238a806131ee7f02e9d43467274d1bdb6 (diff) |
clean up tsc sched patch
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2499 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/linux-2.4/patches/ar7/006-sched_use_tsc.patch | 12 | ||||
-rw-r--r-- | target/linux/linux-2.4/patches/brcm/007-sched_use_tsc.patch | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/target/linux/linux-2.4/patches/ar7/006-sched_use_tsc.patch b/target/linux/linux-2.4/patches/ar7/006-sched_use_tsc.patch index 73d177b10f..69bf01a768 100644 --- a/target/linux/linux-2.4/patches/ar7/006-sched_use_tsc.patch +++ b/target/linux/linux-2.4/patches/ar7/006-sched_use_tsc.patch @@ -1,7 +1,7 @@ diff -urN linux.old/arch/mips/kernel/time.c linux.dev/arch/mips/kernel/time.c --- linux.old/arch/mips/kernel/time.c 2005-11-14 11:06:38.661262000 +0100 -+++ linux.dev/arch/mips/kernel/time.c 2005-11-14 11:10:42.856523250 +0100 -@@ -151,6 +151,16 @@ ++++ linux.dev/arch/mips/kernel/time.c 2005-11-15 15:21:17.890005500 +0100 +@@ -151,6 +151,20 @@ unsigned int (*mips_hpt_read)(void); void (*mips_hpt_init)(unsigned int); @@ -13,12 +13,16 @@ diff -urN linux.old/arch/mips/kernel/time.c linux.dev/arch/mips/kernel/time.c +extern __u64 get_tscll(void) +{ + __u32 c = read_c0_count(); -+ return ((((__u64) timerhi) + (c < timerlo)) << 32) | ((__u64) ((__u32) c)); ++ __u64 h = (__u64) timerhi; ++ h += (c < timerlo); ++ h <<= 32; ++ h += c; ++ return h; +} /* * timeofday services, for syscalls. -@@ -761,3 +771,5 @@ +@@ -761,3 +775,5 @@ EXPORT_SYMBOL(to_tm); EXPORT_SYMBOL(rtc_set_time); EXPORT_SYMBOL(rtc_get_time); diff --git a/target/linux/linux-2.4/patches/brcm/007-sched_use_tsc.patch b/target/linux/linux-2.4/patches/brcm/007-sched_use_tsc.patch index 73d177b10f..69bf01a768 100644 --- a/target/linux/linux-2.4/patches/brcm/007-sched_use_tsc.patch +++ b/target/linux/linux-2.4/patches/brcm/007-sched_use_tsc.patch @@ -1,7 +1,7 @@ diff -urN linux.old/arch/mips/kernel/time.c linux.dev/arch/mips/kernel/time.c --- linux.old/arch/mips/kernel/time.c 2005-11-14 11:06:38.661262000 +0100 -+++ linux.dev/arch/mips/kernel/time.c 2005-11-14 11:10:42.856523250 +0100 -@@ -151,6 +151,16 @@ ++++ linux.dev/arch/mips/kernel/time.c 2005-11-15 15:21:17.890005500 +0100 +@@ -151,6 +151,20 @@ unsigned int (*mips_hpt_read)(void); void (*mips_hpt_init)(unsigned int); @@ -13,12 +13,16 @@ diff -urN linux.old/arch/mips/kernel/time.c linux.dev/arch/mips/kernel/time.c +extern __u64 get_tscll(void) +{ + __u32 c = read_c0_count(); -+ return ((((__u64) timerhi) + (c < timerlo)) << 32) | ((__u64) ((__u32) c)); ++ __u64 h = (__u64) timerhi; ++ h += (c < timerlo); ++ h <<= 32; ++ h += c; ++ return h; +} /* * timeofday services, for syscalls. -@@ -761,3 +771,5 @@ +@@ -761,3 +775,5 @@ EXPORT_SYMBOL(to_tm); EXPORT_SYMBOL(rtc_set_time); EXPORT_SYMBOL(rtc_get_time); |