From patchwork Thu Jan 22 12:01:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "pang.xunlei" X-Patchwork-Id: 43515 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 43482218DB for ; Thu, 22 Jan 2015 12:02:49 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id l61sf804684wev.0 for ; Thu, 22 Jan 2015 04:02:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=aqkNSIMzOpXkg7KWrbWUFPA6PengQpdWCgr6HoLeKO8=; b=XQbc5hl2PUGspavs4FlO44EcMPq/2YuceTTD7ksrzB3Cd3gNqzigLVRQkUHdEM7rRS DsWlioH1Ub12kMBeByYTRYm7gNRENHynXGVyQqwTuS3XzjefbqNs7wwEpq60hKUQrsG+ NLZMUDDq4IkwAswIvmtkHBJDX5jkFwwJ32eQXQrU1vV7hfdkxD4sPTWneq7byl3I6D1u mz8Zhf3WdmoHMKDi/UAcBxJ4WmBEg7yWqks0ePMyBLkcDTMoFzuqlUGMVn1Mk2D8OjNX tzxEngAcxVEOtL3oJhPuLk3LKfN3TjEn2CfmIohMwP+eyGP7hLStmI+Q1Y3gmwYxqWgW 0M9Q== X-Gm-Message-State: ALoCoQmmbOLK47znq1uoqqKEXP8q4Ql4E/rsLnzQsfq/YVhVdaNcbxNtyYATDUWzGKiJFKzlrR+5 X-Received: by 10.180.105.97 with SMTP id gl1mr4274916wib.7.1421928168577; Thu, 22 Jan 2015 04:02:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.14 with SMTP id js14ls162877lab.69.gmail; Thu, 22 Jan 2015 04:02:48 -0800 (PST) X-Received: by 10.152.3.70 with SMTP id a6mr1053296laa.71.1421928168392; Thu, 22 Jan 2015 04:02:48 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id r3si20584521lbo.9.2015.01.22.04.02.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 04:02:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id s18so1181103lam.3 for ; Thu, 22 Jan 2015 04:02:48 -0800 (PST) X-Received: by 10.112.26.135 with SMTP id l7mr1123399lbg.56.1421928168283; Thu, 22 Jan 2015 04:02:48 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp237782lbb; Thu, 22 Jan 2015 04:02:47 -0800 (PST) X-Received: by 10.68.129.39 with SMTP id nt7mr1647708pbb.96.1421928166285; Thu, 22 Jan 2015 04:02:46 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pt2si11736385pbb.199.2015.01.22.04.02.45; Thu, 22 Jan 2015 04:02:46 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752258AbbAVMCk (ORCPT + 28 others); Thu, 22 Jan 2015 07:02:40 -0500 Received: from mail-qc0-f170.google.com ([209.85.216.170]:48575 "EHLO mail-qc0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbbAVMC0 (ORCPT ); Thu, 22 Jan 2015 07:02:26 -0500 Received: by mail-qc0-f170.google.com with SMTP id p6so800931qcv.1 for ; Thu, 22 Jan 2015 04:02:26 -0800 (PST) X-Received: by 10.140.109.55 with SMTP id k52mr1456391qgf.99.1421928146129; Thu, 22 Jan 2015 04:02:26 -0800 (PST) Received: from ip-10-181-65-231.ec2.internal ([54.235.93.228]) by mx.google.com with ESMTPSA id j6sm3012956qga.9.2015.01.22.04.02.25 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 04:02:25 -0800 (PST) From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Thomas Gleixner , Alessandro Zummo , John Stultz , Arnd Bergmann , Xunlei Pang Subject: [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP Date: Thu, 22 Jan 2015 12:01:17 +0000 Message-Id: <1421928077-4698-3-git-send-email-pang.xunlei@linaro.org> X-Mailer: git-send-email 2.2.1 In-Reply-To: <1421928077-4698-1-git-send-email-pang.xunlei@linaro.org> References: <1421928077-4698-1-git-send-email-pang.xunlei@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pang.xunlei@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When doing timekeeping_resume(), if the nonstop clocksource wraps back, "cycle_delta" will miss the wrap time. It's hard to determine the right CLOCKSOURCE_MASK(xxx) or something to add code for inspecting such behavior, and we don't have many existent nonstop clocksources, so just add a comment to indicate that if have this flag set, people are aware that this nonstop clocksource won't wrap back during system suspend/resume. Signed-off-by: Xunlei Pang --- include/linux/clocksource.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index abcafaa..8680189 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -207,6 +207,11 @@ struct clocksource { #define CLOCK_SOURCE_WATCHDOG 0x10 #define CLOCK_SOURCE_VALID_FOR_HRES 0x20 #define CLOCK_SOURCE_UNSTABLE 0x40 + +/* + * When setting this flag, you're also supposed to mean that it doesn't + * wrap back during system suspend/resume. See timekeeping_resume(). + */ #define CLOCK_SOURCE_SUSPEND_NONSTOP 0x80 #define CLOCK_SOURCE_RESELECT 0x100