summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2013-03-12 03:56:47 (GMT)
committerJohn Stultz <john.stultz@linaro.org>2013-03-15 23:51:18 (GMT)
commit82f9c080b22a5b859ae2b50822dfb6b812898fdb (patch)
tree71e75754fe7e2b767599dae712a31d64b1b67afb /arch
parent5caf4636259ae3af0efbb9bfc4cd97874b547c7d (diff)
downloadlinux-fsl-qoriq-82f9c080b22a5b859ae2b50822dfb6b812898fdb.tar.xz
x86: tsc: Add support for new S3_NONSTOP feature
Add support for new S3_NONSTOP feature Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/tsc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 4b9ea10..098b3cf 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -768,7 +768,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_NONSTOP_TSC_S3))
+ clocksource_tsc.cycle_last = 0;
}
static struct clocksource clocksource_tsc = {
@@ -939,6 +940,9 @@ static int __init init_tsc_clocksource(void)
clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS;
}
+ if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC_S3))
+ clocksource_tsc.flags |= CLOCK_SOURCE_SUSPEND_NONSTOP;
+
/*
* Trust the results of the earlier calibration on systems
* exporting a reliable TSC.