summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPavel Tatashin <pasha.tatashin@oracle.com>2018-07-25 16:00:18 -0400
committerThomas Gleixner <tglx@linutronix.de>2018-07-30 19:32:29 +0200
commit684ad537abff987886d63fb3c573eeca40d7f2db (patch)
tree19b1f36de78935005c97516a97f2ab77ea06fc30 /kernel
parent9407f5a7ee77c631d1e100436132437cf6237e45 (diff)
downloadlinux-684ad537abff987886d63fb3c573eeca40d7f2db.tar.bz2
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 <pasha.tatashin@oracle.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> 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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/timekeeping.c2
1 files changed, 1 insertions, 1 deletions
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};
}