From patchwork Tue Jul 17 22:05:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: john stultz X-Patchwork-Id: 10099 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5ECCF23F2A for ; Tue, 17 Jul 2012 22:10:45 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 2F4C9A180ED for ; Tue, 17 Jul 2012 22:10:45 +0000 (UTC) Received: by yhpp61 with SMTP id p61so1060065yhp.11 for ; Tue, 17 Jul 2012 15:10:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-content-scanned:x-cbid:x-gm-message-state; bh=Ty+dRrn6t3gCtJ4XYp/TMY9ZCOCv0UxPfVA8+JKkQpc=; b=aGvBTXEMN1qQBMIaT/TouPEfNOs4Gavh+3QEgGCmAHcA8OrGTJFP/OkuXsLBOrC73g 56AnaQrbt+vQp7YQ8cCd20F4YU32LRZTf2ppXT1AJmLsQh3a2N8vtElmTFo1hdAww8RO gdMgjEdHqbRJs55NOI5xM+qRQZT4aJan3eGiYFXKd9+3GDg2KCv7kLB1ou/kiXxWDaDr X2mUPCHV7w74azJ4j3YVtz8V++tXOn6+CHo47xQmBx+sjjJr+wz3ReCtdW948/8inkue iwYuWeCO8aTVMQdbI93juAlWV/CPqAnm0LhsPxkg+fiPCbEC7meuwtqmLDLuJtnCRrGE rGzQ== Received: by 10.50.87.227 with SMTP id bb3mr196395igb.57.1342563044545; Tue, 17 Jul 2012 15:10:44 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp25074ibb; Tue, 17 Jul 2012 15:10:43 -0700 (PDT) Received: by 10.50.217.137 with SMTP id oy9mr201163igc.56.1342563043664; Tue, 17 Jul 2012 15:10:43 -0700 (PDT) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com. [32.97.182.141]) by mx.google.com with ESMTPS id l10si26610934icz.58.2012.07.17.15.10.43 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jul 2012 15:10:43 -0700 (PDT) Received-SPF: pass (google.com: domain of johnstul@us.ibm.com designates 32.97.182.141 as permitted sender) client-ip=32.97.182.141; Authentication-Results: mx.google.com; spf=pass (google.com: domain of johnstul@us.ibm.com designates 32.97.182.141 as permitted sender) smtp.mail=johnstul@us.ibm.com Received: from /spool/local by e1.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 17 Jul 2012 18:10:42 -0400 Received: from d01dlp03.pok.ibm.com (9.56.224.17) by e1.ny.us.ibm.com (192.168.1.101) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 17 Jul 2012 18:05:51 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 01981C90068; Tue, 17 Jul 2012 18:05:44 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6HM5h0w339414; Tue, 17 Jul 2012 18:05:43 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6HM5hMI022962; Tue, 17 Jul 2012 19:05:43 -0300 Received: from kernel.stglabs.ibm.com (kernel.stglabs.ibm.com [9.114.214.19]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q6HM5hMb022948; Tue, 17 Jul 2012 19:05:43 -0300 From: John Stultz To: stable@vger.kernel.org Cc: John Stultz , Thomas Gleixner , Prarit Bhargava , Linux Kernel , John Stultz Subject: [PATCH 03/11] 2.6.32.x: timekeeping: Fix CLOCK_MONOTONIC inconsistency during leapsecond Date: Tue, 17 Jul 2012 18:05:27 -0400 Message-Id: <1342562735-55870-4-git-send-email-johnstul@us.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1342562735-55870-1-git-send-email-johnstul@us.ibm.com> References: <1342562735-55870-1-git-send-email-johnstul@us.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12071722-6078-0000-0000-00000D4DFC66 X-Gm-Message-State: ALoCoQkKUaNBGnrWnTeh/0rDocZfNcimeSa7ceWgxZPUHmAVDm2KMtRZnci3Q+3oOFZZpsaVNzxk From: John Stultz This is a backport of fad0c66c4bb836d57a5f125ecd38bed653ca863a which resolves a bug the previous commit. Commit 6b43ae8a61 (ntp: Fix leap-second hrtimer livelock) broke the leapsecond update of CLOCK_MONOTONIC. The missing leapsecond update to wall_to_monotonic causes discontinuities in CLOCK_MONOTONIC. Adjust wall_to_monotonic when NTP inserted a leapsecond. Reported-by: Richard Cochran Signed-off-by: John Stultz Tested-by: Richard Cochran Link: http://lkml.kernel.org/r/1338400497-12420-1-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner Cc: Prarit Bhargava Cc: Thomas Gleixner Cc: Linux Kernel Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 00e2fae..6d19a00 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -780,6 +780,7 @@ void update_wall_time(void) xtime.tv_sec++; leap = second_overflow(xtime.tv_sec); xtime.tv_sec += leap; + wall_to_monotonic.tv_sec -= leap; } raw_time.tv_nsec += timekeeper.raw_interval;