From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755203AbbGZKxa (ORCPT ); Sun, 26 Jul 2015 06:53:30 -0400 Received: from m50-112.126.com ([123.125.50.112]:53666 "EHLO m50-112.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755144AbbGZKx2 (ORCPT ); Sun, 26 Jul 2015 06:53:28 -0400 From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , David Howells , Koichi Yasutake , linux-am33-list@redhat.com, Xunlei Pang , John Stultz , Arnd Bergmann Subject: [PATCH v3 1/2] time: Add the common weak version of update_persistent_clock() Date: Sun, 26 Jul 2015 18:45:39 +0800 Message-Id: <1437907540-13610-1-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: j9KowADXZmOlu7RVhtpEAQ--.160S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7JFyDKrW5JFWfZrykCF4xXrb_yoWkCFgEgr 1Iva4vkr1qyr9ay3Wqva1Sqas5trWYvF1qvw4agF97Jr1DJFW3Ary2g393Xw18Cayjkw17 uF45C3y3tr43GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnenmtUUUUU== X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbiWxJDv1PM95kq-wAAsR Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xunlei Pang The weak update_persistent_clock64() calls update_persistent_clock(), if the architecture defines an update_persistent_clock64() to replace and remove its update_persistent_clock() version, when building the kernel the linker will throw an undefined symbol error, that is, any arch that switches to update_persistent_clock64() will have this issue. To solve the issue, we add the common weak update_persistent_clock(). Cc: John Stultz Cc: Arnd Bergmann Signed-off-by: Xunlei Pang --- v2->v3: Improve the changelog according to Thomas's comments. 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