From patchwork Thu Jan 2 22:23:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 22869 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E5795202E2 for ; Thu, 2 Jan 2014 22:23:42 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf74597784oag.1 for ; Thu, 02 Jan 2014 14:23:42 -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=m5orLpivL8tY5yYzuksQOPpXAYnr9yPbKz4s2/W+BLo=; b=boexBqnwzJJeYzWbWWMdLmtGCjTedNm+1tCYANyMUqOMKHhvIn7HJY/BgPFJuvzX/M U61JsUQ8xIZJJ+s7+ycPzCfIv3ffmskVmIHrUoh/NqG2wv8a61UXngQ7MTUYJY4GoxdS gnGeS9GgmuLbfvG5QmDEoayQUJVkkW45ckkhkIUpm19AdPVkNp2PPMH0WBLY/YR4JRV8 B6uh/VcJ10I8p+kp37gesx48J8cTrALW5B9Wym27RJzis/dQH8m25SfMhtqAuwFFVkIG 79nRta+t+9c4rSBj1puhOsKQxETbDQTKPB+ToyaYHIWbQJ9cuhsDB4YkDj1BuOBvd+6U DLcg== X-Gm-Message-State: ALoCoQmddOv48oz2t+wc28Jh4uo43vUfUWWMmEbNSAHV+du6v+3BDBVODDR5XqeNWFVUV+H0EQBd X-Received: by 10.43.74.133 with SMTP id yw5mr28201915icb.15.1388701422057; Thu, 02 Jan 2014 14:23:42 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.81.133 with SMTP id a5ls4685051qey.21.gmail; Thu, 02 Jan 2014 14:23:41 -0800 (PST) X-Received: by 10.220.83.201 with SMTP id g9mr13460188vcl.15.1388701421917; Thu, 02 Jan 2014 14:23:41 -0800 (PST) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id ti3si23718801vdc.106.2014.01.02.14.23.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Jan 2014 14:23:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id ht17so7400420vcb.18 for ; Thu, 02 Jan 2014 14:23:41 -0800 (PST) X-Received: by 10.53.2.36 with SMTP id bl4mr8478vdd.32.1388701421824; Thu, 02 Jan 2014 14:23:41 -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.59.13.131 with SMTP id ey3csp795762ved; Thu, 2 Jan 2014 14:23:41 -0800 (PST) X-Received: by 10.66.159.233 with SMTP id xf9mr62537989pab.139.1388701420952; Thu, 02 Jan 2014 14:23:40 -0800 (PST) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx.google.com with ESMTPS id t6si17101698pbg.65.2014.01.02.14.23.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Jan 2014 14:23:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.220.47; Received: by mail-pa0-f47.google.com with SMTP id kq14so15030252pab.34 for ; Thu, 02 Jan 2014 14:23:40 -0800 (PST) X-Received: by 10.68.213.41 with SMTP id np9mr15340607pbc.90.1388701420528; Thu, 02 Jan 2014 14:23:40 -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 ju10sm104179969pbd.33.2014.01.02.14.23.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Jan 2014 14:23:39 -0800 (PST) From: John Stultz To: LKML Cc: John Stultz , Sasha Levin , Thomas Gleixner , Prarit Bhargava , Richard Cochran , Ingo Molnar , stable Subject: [PATCH 6/9] timekeeping: Fix missing timekeeping_update in suspend path Date: Thu, 2 Jan 2014 14:23:24 -0800 Message-Id: <1388701407-5029-6-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1388701407-5029-1-git-send-email-john.stultz@linaro.org> References: <52C5E6A0.7010507@linaro.org> <1388701407-5029-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.220.173 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: Sasha Levin 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 3f6a827..2793c43 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);