From patchwork Sun Jul 26 10:45:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xunlei Pang X-Patchwork-Id: 51472 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id DE88522DA5 for ; Sun, 26 Jul 2015 10:53:38 +0000 (UTC) Received: by lbcjf8 with SMTP id jf8sf19396460lbc.0 for ; Sun, 26 Jul 2015 03:53:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=+Bedw1vFEqlhKNZPL+Zm3yFItLP1A0f1hBihD194fVg=; b=fmi/45K7V9QzI7r4zosHPLo3m0VvCTpuZ2cY7GCMKyFa4l8sNJ8WoH7Cu2ftRnEkmU 0eCkGGIvUf4F5ubCNP+RlZNQsKe1g8JRNvWf4KARCipSfJKNCJNLpATZrKxxuM3ip8W3 yB5YSb29b+QxqSUiZKp86Se/Hy40zjpY8jQ3FLeo3svGrYxJVECMN11L5JrPaNXF8O0Z xE/rRmKTTuSZMzY9EuSdsR79kt0DIaf945wbLt7Y2ZbXFBQiMx4+eUyK22QLRTHL+kOD PyUVqLaJ1PPnO26DSUQD4EtcVc1826LScO8R7XfHslanuOaf9DUFKQNQqdkWtBwtiwrB 2+bA== X-Gm-Message-State: ALoCoQm08pPHHfga87O+6X0hOKpNSWj6w/heMsEKA+iRWCyKm2GEYM+JlFQfGjbtPCo8CRcK+E4m X-Received: by 10.112.253.135 with SMTP id aa7mr9915307lbd.11.1437908017953; Sun, 26 Jul 2015 03:53:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.30.36 with SMTP id p4ls560966lah.63.gmail; Sun, 26 Jul 2015 03:53:37 -0700 (PDT) X-Received: by 10.112.220.7 with SMTP id ps7mr21749337lbc.72.1437908017764; Sun, 26 Jul 2015 03:53:37 -0700 (PDT) Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com. [2a00:1450:4010:c03::22a]) by mx.google.com with ESMTPS id jc6si12424078lac.71.2015.07.26.03.53.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Jul 2015 03:53:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22a as permitted sender) client-ip=2a00:1450:4010:c03::22a; Received: by lagw2 with SMTP id w2so34317459lag.3 for ; Sun, 26 Jul 2015 03:53:37 -0700 (PDT) X-Received: by 10.152.120.135 with SMTP id lc7mr21513917lab.41.1437908017619; Sun, 26 Jul 2015 03:53:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp962606lba; Sun, 26 Jul 2015 03:53:36 -0700 (PDT) X-Received: by 10.66.216.74 with SMTP id oo10mr51212727pac.82.1437908015757; Sun, 26 Jul 2015 03:53:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si35195254pas.176.2015.07.26.03.53.34; Sun, 26 Jul 2015 03:53:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755204AbbGZKxa (ORCPT + 28 others); 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 Received: from localhost.localdomain (unknown [210.21.223.3]) by smtp6 (Coremail) with SMTP id j9KowADXZmOlu7RVhtpEAQ--.160S3; Sun, 26 Jul 2015 18:51:26 +0800 (CST) 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 Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: xlpang@126.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22a as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@126.com; dmarc=fail (p=NONE dis=NONE) header.from=126.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;