From patchwork Wed Apr 10 19:41:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 16038 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C868C23912 for ; Wed, 10 Apr 2013 19:42:18 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id gd11sf1293681vcb.1 for ; Wed, 10 Apr 2013 12:41:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=2a0e8cVecCSGg2LcCCqu+5tdzj64HCtv3/deqcJrZAE=; b=YLf8/jRfgt5m7IYeh7Qq3V6cyxYztn7DbNCJelM579jcYtTgvkKTF5YnOcgQjg0QdP XhCF10FibUV/eqqfNBRq2dhFu5UD2L82eZhxxS8mseAOSoQdYqNEXrkbG/6Qg58Evt/2 Wx/47KgnsIF1znGJFhQctk+xC73NaAHgBgzp9Hmqq8RzjuLjwEMq+/uMR3iDRwz2AbsN GibGbzhV3MSEHK5DbZYWDOou1OimKBXyPgXoq2auesbtN7RFkFa3LWniPBnVrgSLMhG/ z9afzuVCTNq8a75xB+8WPw79au9syvsO3UMZRgtbfC4jmIc1rFNJ1kTEMtbBzrycdRWx tDmA== X-Received: by 10.236.148.211 with SMTP id v59mr1763336yhj.2.1365622918627; Wed, 10 Apr 2013 12:41:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.74 with SMTP id eo10ls541652qeb.29.gmail; Wed, 10 Apr 2013 12:41:58 -0700 (PDT) X-Received: by 10.58.15.193 with SMTP id z1mr2696456vec.40.1365622918182; Wed, 10 Apr 2013 12:41:58 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id gy7si948256vcb.20.2013.04.10.12.41.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 12:41:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id hx10so694984vcb.14 for ; Wed, 10 Apr 2013 12:41:58 -0700 (PDT) X-Received: by 10.58.206.102 with SMTP id ln6mr2684893vec.37.1365622917962; Wed, 10 Apr 2013 12:41:57 -0700 (PDT) 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.58.85.136 with SMTP id h8csp119302vez; Wed, 10 Apr 2013 12:41:57 -0700 (PDT) X-Received: by 10.68.13.168 with SMTP id i8mr4812052pbc.86.1365622916803; Wed, 10 Apr 2013 12:41:56 -0700 (PDT) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id pt2si1132185pbb.19.2013.04.10.12.41.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 12:41:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.220.52; Received: by mail-pa0-f52.google.com with SMTP id fb10so488854pad.25 for ; Wed, 10 Apr 2013 12:41:56 -0700 (PDT) X-Received: by 10.66.183.33 with SMTP id ej1mr5426565pac.8.1365622916144; Wed, 10 Apr 2013 12:41:56 -0700 (PDT) Received: from localhost.localdomain (c-24-21-54-107.hsd1.or.comcast.net. [24.21.54.107]) by mx.google.com with ESMTPS id ak5sm1642249pac.4.2013.04.10.12.41.54 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 12:41:55 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Thomas Gleixner Subject: [PATCH] timekeeping: Make sure to notify hrtimers when TAI offset changes Date: Wed, 10 Apr 2013 12:41:49 -0700 Message-Id: <1365622909-953-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQlwZCKUEev1AGr6JzUb2Sia3hfsoptpYP1RiYETV0hAoKHkzumUl8JBAoKkUE0XA+58RJAQ X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 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: , Hey Thomas, here's a bugfix I just caught with my 3.10 queue. Mind adding this to tip/timers/core? thanks -john Now that we have CLOCK_TAI timers, make sure we notify hrtimer code when TAI offset is changed. Cc: Thomas Gleixner Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index c4d2a87..675f720 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -607,6 +607,7 @@ void timekeeping_set_tai_offset(s32 tai_offset) __timekeeping_set_tai_offset(tk, tai_offset); write_seqcount_end(&timekeeper_seq); raw_spin_unlock_irqrestore(&timekeeper_lock, flags); + clock_was_set(); } /** @@ -1639,7 +1640,7 @@ int do_adjtimex(struct timex *txc) struct timekeeper *tk = &timekeeper; unsigned long flags; struct timespec ts; - s32 tai; + s32 orig_tai, tai; int ret; /* Validate the data before disabling interrupts */ @@ -1663,10 +1664,13 @@ int do_adjtimex(struct timex *txc) raw_spin_lock_irqsave(&timekeeper_lock, flags); write_seqcount_begin(&timekeeper_seq); - tai = tk->tai_offset; + orig_tai = tai = tk->tai_offset; ret = __do_adjtimex(txc, &ts, &tai); - __timekeeping_set_tai_offset(tk, tai); + if (tai != orig_tai) { + __timekeeping_set_tai_offset(tk, tai); + clock_was_set_delayed(); + } write_seqcount_end(&timekeeper_seq); raw_spin_unlock_irqrestore(&timekeeper_lock, flags);