Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a3b13c23f186ecb57204580cc1f2dbe9c284953a
Commit:     a3b13c23f186ecb57204580cc1f2dbe9c284953a
Parent:     3806204ca9017a2cf2d849430f26e2b62666f5b2
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:26:06 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:42:46 2007 -0700

    softlockup: use cpu_clock() instead of sched_clock()
    
    sched_clock() is not a reliable time-source, use cpu_clock() instead.
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/softlockup.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 708d488..68f7606 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -40,14 +40,16 @@ static struct notifier_block panic_block = {
  * resolution, and we don't need to waste time with a big divide when
  * 2^30ns == 1.074s.
  */
-static unsigned long get_timestamp(void)
+static unsigned long get_timestamp(int this_cpu)
 {
-       return sched_clock() >> 30;  /* 2^30 ~= 10^9 */
+       return cpu_clock(this_cpu) >> 30;  /* 2^30 ~= 10^9 */
 }
 
 void touch_softlockup_watchdog(void)
 {
-       __raw_get_cpu_var(touch_timestamp) = get_timestamp();
+       int this_cpu = raw_smp_processor_id();
+
+       __raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu);
 }
 EXPORT_SYMBOL(touch_softlockup_watchdog);
 
@@ -91,7 +93,7 @@ void softlockup_tick(void)
                return;
        }
 
-       now = get_timestamp();
+       now = get_timestamp(this_cpu);
 
        /* Wake up the high-prio watchdog task every second: */
        if (now > (touch_timestamp + 1))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to