Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754520Ab3CFHTH (ORCPT ); Wed, 6 Mar 2013 02:19:07 -0500 Received: from mga11.intel.com ([192.55.52.93]:37047 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972Ab3CFHTD (ORCPT ); Wed, 6 Mar 2013 02:19:03 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,793,1355126400"; d="scan'208";a="299868725" From: Feng Tang To: Thomas Gleixner , John Stultz , Ingo Molnar , "H. Peter Anvin" , Jason Gunthorpe , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Cc: gong.chen@linux.intel.com, Feng Tang Subject: [PATCH v3 3/5] x86: tsc: Add support for new S3_NONSTOP feature Date: Wed, 6 Mar 2013 15:17:49 +0800 Message-Id: <1362554271-22382-4-git-send-email-feng.tang@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362554271-22382-1-git-send-email-feng.tang@intel.com> References: <1362554271-22382-1-git-send-email-feng.tang@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1164 Lines: 37 Signed-off-by: Feng Tang --- 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 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. -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/