lkml.org 
[lkml]   [2013]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 3/5] x86: tsc: Add support for new S3_NOTSTOP feature
Date
Signed-off-by: Feng Tang <feng.tang@intel.com>
---
arch/x86/kernel/tsc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 06ccb50..4cc33ca 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -767,7 +767,8 @@ static cycle_t read_tsc(struct clocksource *cs)

static void resume_tsc(struct clocksource *cs)
{
- clocksource_tsc.cycle_last = 0;
+ if (!boot_cpu_has(X86_FEATURE_TSC_S3_NOTSTOP))
+ clocksource_tsc.cycle_last = 0;
}

static struct clocksource clocksource_tsc = {
@@ -938,6 +939,9 @@ static int __init init_tsc_clocksource(void)
clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS;
}

+ if (boot_cpu_has(X86_FEATURE_TSC_S3_NOTSTOP))
+ clocksource_tsc.flags |= CLOCK_SOURCE_SUSPEND_NOTSTOP;
+
/*
* Trust the results of the earlier calibration on systems
* exporting a reliable TSC.
--
1.7.9.5


\
 
 \ /
  Last update: 2013-01-21 08:21    [W:0.203 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site