Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1192455

[PATCH v2 1/2] time: Add the common weak version of update_persistent_clock()

Path csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Xunlei Pang <xlpang@126.com>
Newsgroups linux.kernel
Subject [PATCH v2 1/2] time: Add the common weak version of update_persistent_clock()
Date Sun, 26 Jul 2015 04:00:01 +0200
Message-ID <pQjol-5ui-5@gated-at.bofh.it> (permalink)
X-Original-To linux-kernel@vger.kernel.org
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id; bh=6MDIPbYo5aEyc0f9rD jB8eo2D8f4JFyqoVKkpTG0XTs=; b=XYLJJHO5eJ5tymhwP4M2aiqq/GSKgtlWyE dGC60iLuOjqwkhNqO5qkECbOSZO/Bt2F4gUi4RFX/LPPrBApDs6FtbrjVA1qyy/c +3uFHzlFfXd8oQIah9A3OQx2w9SOvwrHwn+EaDPBOpftNiWWHj/CojTKsol78AnX asNh4ur3E=
X-Mailer git-send-email 1.9.1
X-Cm-Transid jdKowAAHrCTXPbRVwMbaAQ--.5958S3
X-Coremail-Antispam 1Uf129KBjvdXoW7JFyDKrW5JFyrXr1fKr1UGFg_yoWDuFcEgr 12qFykKr1ktF9ayF1qya1SqF95trWYvF1qvwsIgFWxJr1DJF1UJry2g393Xw1UZFW09r17 uF45C3y3tr13JjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnenmtUUUUU==
X-Originating-IP [210.21.223.3]
X-Cm-Senderinfo p0ost0bj6rjloofrz/1tbiXB9Dv1R0Xn-qWgAAsO
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 42
Organization linux.* mail to news gateway
X-Original-Cc Thomas Gleixner <tglx@linutronix.de>, David Howells <dhowells@redhat.com>, Koichi Yasutake <yasutake.koichi@jp.panasonic.com>, linux-am33-list@redhat.com, Xunlei Pang <pang.xunlei@linaro.org>, John Stultz <john.stultz@linaro.org>, Arnd Bergmann <arnd@arndb.de>
X-Original-Date Sun, 26 Jul 2015 09:53:52 +0800
X-Original-Message-ID <1437875633-5715-1-git-send-email-xlpang@126.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1192455

Show key headers only | View raw


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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/2] time: Add the common weak version of update_persistent_clock() Xunlei Pang <xlpang@126.com> - 2015-07-26 04:00 +0200
  [PATCH v2 2/2] mn10300: time: Provide 64-bit persistent clock time Xunlei Pang <xlpang@126.com> - 2015-07-26 04:00 +0200

csiph-web