From patchwork Wed Dec 11 19:11:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 22256 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E1462202E6 for ; Wed, 11 Dec 2013 19:11:52 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id e14sf25411017iej.4 for ; Wed, 11 Dec 2013 11:11:52 -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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=3MISwrZeHhs1LileTTr0QOOoO1U5rubdHyB6tgfyXBk=; b=fqAxchXvq6PPeXE9HNhuwMFlsSm5/Zq1QmOOgnfjcK5BnS6xFvJfPrpWsZBMMT1Pgy eKpfFKnfYcZxGBepMe1hrcYIhup4gDL1Bdf1E2uc9WOBRkWksbo5rY5Xfs4vWM9rAQVj iwBgVp39pM3GqmfupubGnvqWXSk+kzfnLMbfujAqe3u9ukmti4LFkreJ2D7kouTuICe4 L87eM5yfIP5WPGrb9shFLbbslS1kDC10pCinWyaftfX+wnVmRTRdF062ZxuFwoxbC8M3 Z6kS/+0Fci31QHzFzKtS8cYjj7e2oWf1wPEqFYmdNYmIgdfsuHq+T9qplkmVUgyM2ww+ eY9Q== X-Gm-Message-State: ALoCoQnZq+6jRgibAQHhq1Zp52lnCdM9aFVloSp5miDuzqfAiNeYU2dhUejXXfDYnYlM1/kpQbGL X-Received: by 10.182.161.105 with SMTP id xr9mr1261424obb.31.1386789112320; Wed, 11 Dec 2013 11:11:52 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.138 with SMTP id k10ls202086qek.13.gmail; Wed, 11 Dec 2013 11:11:52 -0800 (PST) X-Received: by 10.58.186.198 with SMTP id fm6mr1252897vec.16.1386789112191; Wed, 11 Dec 2013 11:11:52 -0800 (PST) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id td8si6724960vdc.79.2013.12.11.11.11.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Dec 2013 11:11:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so6216832veb.6 for ; Wed, 11 Dec 2013 11:11:52 -0800 (PST) X-Received: by 10.52.227.165 with SMTP id sb5mr312406vdc.85.1386789112105; Wed, 11 Dec 2013 11:11:52 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp296256vcz; Wed, 11 Dec 2013 11:11:51 -0800 (PST) X-Received: by 10.68.219.72 with SMTP id pm8mr3992177pbc.164.1386789111366; Wed, 11 Dec 2013 11:11:51 -0800 (PST) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by mx.google.com with ESMTPS id pj7si14302053pbc.339.2013.12.11.11.11.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Dec 2013 11:11:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.170 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.192.170; Received: by mail-pd0-f170.google.com with SMTP id g10so10146678pdj.1 for ; Wed, 11 Dec 2013 11:11:51 -0800 (PST) X-Received: by 10.68.200.72 with SMTP id jq8mr4056837pbc.100.1386789110963; Wed, 11 Dec 2013 11:11:50 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id ki1sm34506989pbd.1.2013.12.11.11.11.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Dec 2013 11:11:50 -0800 (PST) From: John Stultz To: LKML Cc: John Stultz , Thomas Gleixner , Prarit Bhargava , Richard Cochran , Ingo Molnar , stable Subject: [RFC][PATCH 5/5] timekeeping: Fix missing timekeeping_update in suspend path Date: Wed, 11 Dec 2013 11:11:38 -0800 Message-Id: <1386789098-17391-6-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386789098-17391-1-git-send-email-john.stultz@linaro.org> References: <1386789098-17391-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Since 48cdc135d4840 (Implement a shadow timekeeper), we have to call timekeeping_update() after any adjustment to the timekeeping structure in order to make sure that any adjustments to the structure persist. In the timekeeping suspend path, we udpate the timekeeper structure, so we should be sure to update the shadow-timekeeper before releasing the timekeeping locks. Currently this isn't done. In most cases, the next time related code to run would be timekeeping_resume, which does update the shadow-timekeeper, but in an abundence of caution, this patch adds the call to timekeeping_update() in the suspend path. Cc: Thomas Gleixner Cc: Prarit Bhargava Cc: Richard Cochran Cc: Ingo Molnar Cc: stable #3.10+ Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index a4c5742..25ec642 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1024,6 +1024,8 @@ static int timekeeping_suspend(void) timekeeping_suspend_time = timespec_add(timekeeping_suspend_time, delta_delta); } + + timekeeping_update(tk, TK_MIRROR); write_seqcount_end(&timekeeper_seq); raw_spin_unlock_irqrestore(&timekeeper_lock, flags);