Changeset 2503


Ignore:
Timestamp:
2005-11-15T20:24:51+01:00 (11 years ago)
Author:
nbd
Message:

work around the remaining race condition in the tsc sched stuff

Location:
trunk/openwrt/target/linux/linux-2.4/patches
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/target/linux/linux-2.4/patches/ar7/006-sched_use_tsc.patch

    r2499 r2503  
    11diff -urN linux.old/arch/mips/kernel/time.c linux.dev/arch/mips/kernel/time.c 
    22--- 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 15:21:17.890005500 +0100 
    4 @@ -151,6 +151,20 @@ 
     3+++ linux.dev/arch/mips/kernel/time.c   2005-11-15 20:02:50.059676750 +0100 
     4@@ -151,6 +151,27 @@ 
    55 unsigned int (*mips_hpt_read)(void); 
    66 void (*mips_hpt_init)(unsigned int); 
     
    1111+} 
    1212+ 
     13+static __u64 tscll_last = 0; 
     14+ 
    1315+extern __u64 get_tscll(void) 
    1416+{ 
     17+       __u64 h = (__u64) timerhi; 
    1518+       __u32 c = read_c0_count(); 
    16 +       __u64 h = (__u64) timerhi; 
    17 +       h += (c < timerlo); 
     19+ 
    1820+       h <<= 32; 
    1921+       h += c; 
     22+ 
     23+       while (h < tscll_last) 
     24+               h += (((__u64) 1) << 32); 
     25+ 
     26+       tscll_last = h; 
    2027+       return h;        
    2128+} 
     
    2330 /* 
    2431  * timeofday services, for syscalls. 
    25 @@ -761,3 +775,5 @@ 
     32@@ -761,3 +782,5 @@ 
    2633 EXPORT_SYMBOL(to_tm); 
    2734 EXPORT_SYMBOL(rtc_set_time); 
  • trunk/openwrt/target/linux/linux-2.4/patches/brcm/007-sched_use_tsc.patch

    r2499 r2503  
    11diff -urN linux.old/arch/mips/kernel/time.c linux.dev/arch/mips/kernel/time.c 
    22--- 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 15:21:17.890005500 +0100 
    4 @@ -151,6 +151,20 @@ 
     3+++ linux.dev/arch/mips/kernel/time.c   2005-11-15 20:02:50.059676750 +0100 
     4@@ -151,6 +151,27 @@ 
    55 unsigned int (*mips_hpt_read)(void); 
    66 void (*mips_hpt_init)(unsigned int); 
     
    1111+} 
    1212+ 
     13+static __u64 tscll_last = 0; 
     14+ 
    1315+extern __u64 get_tscll(void) 
    1416+{ 
     17+       __u64 h = (__u64) timerhi; 
    1518+       __u32 c = read_c0_count(); 
    16 +       __u64 h = (__u64) timerhi; 
    17 +       h += (c < timerlo); 
     19+ 
    1820+       h <<= 32; 
    1921+       h += c; 
     22+ 
     23+       while (h < tscll_last) 
     24+               h += (((__u64) 1) << 32); 
     25+ 
     26+       tscll_last = h; 
    2027+       return h;        
    2128+} 
     
    2330 /* 
    2431  * timeofday services, for syscalls. 
    25 @@ -761,3 +775,5 @@ 
     32@@ -761,3 +782,5 @@ 
    2633 EXPORT_SYMBOL(to_tm); 
    2734 EXPORT_SYMBOL(rtc_set_time); 
Note: See TracChangeset for help on using the changeset viewer.