Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4220053imm; Mon, 30 Jul 2018 10:38:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcIiPebi1pAfGX20VOJB12ldLcXFfDtg7V9HjNpNYAZPX82SwAs1OzB9j4rz0GNgNPymwPJ X-Received: by 2002:a63:b213:: with SMTP id x19-v6mr17114163pge.393.1532972285081; Mon, 30 Jul 2018 10:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532972285; cv=none; d=google.com; s=arc-20160816; b=pJva1VsIDRgQvS8TGZvnZ753NzNXm4SdrTBy+/1ciRgUKx1HkW3BOZuVAUaO180Tsy Z/4lNNl+wOO/3p4fcY+pRxEGrTRmDXdLC0IO3sJSQCk+LZjxwvUhH5s3mHXcWA0KU4Br arRLSa27lYzKBYXkZsWJzNpfng/Q/BSu8VR7MOjJ4U+SgUnSpEg/KSAKtQYtpehjHXd5 n4JwvBagHMlkAHKnp7S3lbRs3+Z4PcM2wAIshOpQFoHwEUR7Fajw7oPOJikTIjMNG/T8 uFdO47hQQ+rimfx9FxCp6Jce3hCGVqn1Gap4WoL85WAEsPxx00UYOb6oeShcJj+iyzku h72w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=RTmWU1j4cBqa7XYj1q16N1iAtkdDAcEpFUmaZTikWu8=; b=XcLiPLISvZ87fG3Jk8yfPTJ2qHKjk7STZw2ejFJ0AsDyY0pRWzhb0DY5AUerTaaK5D L4a8awt/HLBd1/AhcgJYTulEVN4a+8xWTsLyrfWPdjNJ7My78MKeEviX8upJTMKH6bG4 SsdzhBpHjZRkrmAVxbWxmxWiq9M7j3WXJky5pi8Tg9Cyf6RYXN5+MQApUNMrOJodA3HN ZFOG2VAuu7mfwpHjMZUGLUWx16Hpfprvqx7czwSjrrFHKoHZhcfJ16V8VX1s6CcfIm88 v9uYfatTkoFrUB0TqqRlnyZBMxn1HL7fw3g28RJwx5l7/6u77kpkysW/cY5fe0aqVAEK FKLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11-v6si10038731plo.293.2018.07.30.10.37.50; Mon, 30 Jul 2018 10:38:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727597AbeG3TNC (ORCPT + 99 others); Mon, 30 Jul 2018 15:13:02 -0400 Received: from terminus.zytor.com ([198.137.202.136]:38607 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727037AbeG3TNC (ORCPT ); Mon, 30 Jul 2018 15:13:02 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w6UHaonv2388487 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Jul 2018 10:36:50 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w6UHaoYo2388484; Mon, 30 Jul 2018 10:36:50 -0700 Date: Mon, 30 Jul 2018 10:36:50 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Pavel Tatashin Message-ID: Cc: pasha.tatashin@oracle.com, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de Reply-To: pasha.tatashin@oracle.com, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org In-Reply-To: <20180725200018.23722-1-pasha.tatashin@oracle.com> References: <20180725200018.23722-1-pasha.tatashin@oracle.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/timers] timekeeping: Prevent false warning when persistent clock is not available Git-Commit-ID: 684ad537abff987886d63fb3c573eeca40d7f2db X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_24_48 autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 684ad537abff987886d63fb3c573eeca40d7f2db Gitweb: https://git.kernel.org/tip/684ad537abff987886d63fb3c573eeca40d7f2db Author: Pavel Tatashin AuthorDate: Wed, 25 Jul 2018 16:00:18 -0400 Committer: Thomas Gleixner CommitDate: Mon, 30 Jul 2018 19:32:29 +0200 timekeeping: Prevent false warning when persistent clock is not available On arches with no persistent clock a message like this is printed during boot: [ 0.000000] Persistent clock returned invalid value The value is not invalid: Zero means that no persistent clock is available and the absence of persistent clock should be quietly accepted. Fixes: 3eca993740b8 ("timekeeping: Replace read_boot_clock64() with read_persistent_wall_and_boot_offset()") Signed-off-by: Pavel Tatashin Signed-off-by: Thomas Gleixner Cc: steven.sistare@oracle.com Cc: daniel.m.jordan@oracle.com Cc: sboyd@kernel.org Cc: john.stultz@linaro.org Link: https://lkml.kernel.org/r/20180725200018.23722-1-pasha.tatashin@oracle.com --- kernel/time/timekeeping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 30d7f64ffc87..6183e7460138 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1536,7 +1536,7 @@ void __init timekeeping_init(void) if (timespec64_valid_strict(&wall_time) && timespec64_to_ns(&wall_time) > 0) { persistent_clock_exists = true; - } else { + } else if (timespec64_to_ns(&wall_time) != 0) { pr_warn("Persistent clock returned invalid value"); wall_time = (struct timespec64){0}; }