mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/2] time: Add the common weak version of update_persistent_clock()
@ 2015-07-26  1:53 Xunlei Pang
  2015-07-26  1:53 ` [PATCH v2 2/2] mn10300: time: Provide 64-bit persistent clock time Xunlei Pang
  2015-07-26  8:54 ` [PATCH v2 1/2] time: Add the common weak version of update_persistent_clock() Thomas Gleixner
  0 siblings, 2 replies; 3+ messages in thread
From: Xunlei Pang @ 2015-07-26  1:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, David Howells, Koichi Yasutake, linux-am33-list,
	Xunlei Pang, John Stultz, Arnd Bergmann

From: Xunlei Pang <pang.xunlei@linaro.org>

The weak update_persistent_clock64() calls update_persistent_clock(),
if the architecture defines a update_persistent_clock64() to replace
and remove its update_persistent_clock() version, the compiler will
throw an undefined symbol error, that is, any arch that switches to
update_persistent_clock64() will have this issue.

So, we should add the common weak update_persistent_clock().

Cc: John Stultz <john.stultz@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
---
 kernel/time/ntp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index fb4d98c..df68cb8 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -487,6 +487,11 @@ out:
 }
 
 #ifdef CONFIG_GENERIC_CMOS_UPDATE
+int __weak update_persistent_clock(struct timespec now)
+{
+	return -ENODEV;
+}
+
 int __weak update_persistent_clock64(struct timespec64 now64)
 {
 	struct timespec now;
-- 
1.9.1



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

end of thread, other threads:[~2015-07-26  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-26  1:53 [PATCH v2 1/2] time: Add the common weak version of update_persistent_clock() Xunlei Pang
2015-07-26  1:53 ` [PATCH v2 2/2] mn10300: time: Provide 64-bit persistent clock time Xunlei Pang
2015-07-26  8:54 ` [PATCH v2 1/2] time: Add the common weak version of update_persistent_clock() Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®