[PATCH 20/23] clocksource: x86_64 update for new flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Update x86_64 for new flags.

Signed-Off-By: Daniel Walker <[email protected]>

---
 arch/x86_64/kernel/hpet.c |    1 -
 arch/x86_64/kernel/tsc.c  |   11 ++++-------
 2 files changed, 4 insertions(+), 8 deletions(-)

Index: linux-2.6.19/arch/x86_64/kernel/hpet.c
===================================================================
--- linux-2.6.19.orig/arch/x86_64/kernel/hpet.c
+++ linux-2.6.19/arch/x86_64/kernel/hpet.c
@@ -470,7 +470,6 @@ struct clocksource clocksource_hpet = {
 	.mask		= (cycle_t)HPET_MASK,
 	.mult		= 0, /* set below */
 	.shift		= HPET_SHIFT,
-	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
 	.vread		= vread_hpet,
 };
 
Index: linux-2.6.19/arch/x86_64/kernel/tsc.c
===================================================================
--- linux-2.6.19.orig/arch/x86_64/kernel/tsc.c
+++ linux-2.6.19/arch/x86_64/kernel/tsc.c
@@ -195,18 +195,15 @@ static struct clocksource clocksource_ts
 	.read			= read_tsc,
 	.mask			= CLOCKSOURCE_MASK(64),
 	.shift			= 22,
-	.flags			= CLOCK_SOURCE_IS_CONTINUOUS |
-				  CLOCK_SOURCE_MUST_VERIFY,
+	.flags                  = CLOCKSOURCE_64BITS | CLOCKSOURCE_PM_AFFECTED,
 	.vread			= vread_tsc,
 };
 
 void mark_tsc_unstable(void)
 {
 	/* check to see if we should switch to the safe clocksource: */
-	if (unlikely(!tsc_unstable && clocksource_tsc.rating != 50)) {
-		clocksource_tsc.rating = 50;
-		clocksource_rating_change(&clocksource_tsc);
-	}
+	if (unlikely(!tsc_unstable && clocksource_tsc.rating != 50))
+		clocksource_tsc.flags |= CLOCKSOURCE_UNSTABLE;
 
 	tsc_unstable = 1;
 }
@@ -218,7 +215,7 @@ static int __init init_tsc_clocksource(v
 		clocksource_tsc.mult = clocksource_khz2mult(cpu_khz,
 							clocksource_tsc.shift);
 		if (check_tsc_unstable())
-			clocksource_tsc.rating = 50;
+			clocksource_tsc.flags |= CLOCKSOURCE_UNSTABLE;
 
 		return clocksource_register(&clocksource_tsc);
 	}

-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux