linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] timekeeping: warning when persistent clock is not available
@ 2018-07-25 20:00 Pavel Tatashin
  2018-07-30 11:48 ` [tip:x86/timers] timekeeping: Warning " tip-bot for Pavel Tatashin
  2018-07-30 17:36 ` [tip:x86/timers] timekeeping: Prevent false warning " tip-bot for Pavel Tatashin
  0 siblings, 2 replies; 3+ messages in thread
From: Pavel Tatashin @ 2018-07-25 20:00 UTC (permalink / raw)
  To: steven.sistare, daniel.m.jordan, x86, linux-kernel, tglx, sboyd,
	pasha.tatashin, john.stultz

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: it simply zero meaning no persistent clock 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>
---
 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 edf5da78a449..f3b22f456fac 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1557,7 +1557,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};
 	}
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:x86/timers] timekeeping: Warning when persistent clock is not available
  2018-07-25 20:00 [PATCH] timekeeping: warning when persistent clock is not available Pavel Tatashin
@ 2018-07-30 11:48 ` tip-bot for Pavel Tatashin
  2018-07-30 17:36 ` [tip:x86/timers] timekeeping: Prevent false warning " tip-bot for Pavel Tatashin
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Pavel Tatashin @ 2018-07-30 11:48 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: pasha.tatashin, hpa, mingo, linux-kernel, tglx

Commit-ID:  b8becb6ca494ddb84f5752ecdb6d56ae49d9ab8a
Gitweb:     https://git.kernel.org/tip/b8becb6ca494ddb84f5752ecdb6d56ae49d9ab8a
Author:     Pavel Tatashin <pasha.tatashin@oracle.com>
AuthorDate: Wed, 25 Jul 2018 16:00:18 -0400
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 30 Jul 2018 13:45:20 +0200

timekeeping: 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: it simply zero meaning no persistent clock 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


---
 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};
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:x86/timers] timekeeping: Prevent false warning when persistent clock is not available
  2018-07-25 20:00 [PATCH] timekeeping: warning when persistent clock is not available Pavel Tatashin
  2018-07-30 11:48 ` [tip:x86/timers] timekeeping: Warning " tip-bot for Pavel Tatashin
@ 2018-07-30 17:36 ` tip-bot for Pavel Tatashin
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Pavel Tatashin @ 2018-07-30 17:36 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: pasha.tatashin, linux-kernel, hpa, mingo, tglx

Commit-ID:  684ad537abff987886d63fb3c573eeca40d7f2db
Gitweb:     https://git.kernel.org/tip/684ad537abff987886d63fb3c573eeca40d7f2db
Author:     Pavel Tatashin <pasha.tatashin@oracle.com>
AuthorDate: Wed, 25 Jul 2018 16:00:18 -0400
Committer:  Thomas Gleixner <tglx@linutronix.de>
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 <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
---
 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};
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-30 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 20:00 [PATCH] timekeeping: warning when persistent clock is not available Pavel Tatashin
2018-07-30 11:48 ` [tip:x86/timers] timekeeping: Warning " tip-bot for Pavel Tatashin
2018-07-30 17:36 ` [tip:x86/timers] timekeeping: Prevent false warning " tip-bot for Pavel Tatashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).