From patchwork Thu Apr 19 06:51:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10349183 X-Patchwork-Delegate: deller@gmx.de Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 17E1360365 for ; Thu, 19 Apr 2018 06:51:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05FC527D29 for ; Thu, 19 Apr 2018 06:51:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEB30288DB; Thu, 19 Apr 2018 06:51:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B93227D29 for ; Thu, 19 Apr 2018 06:51:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751228AbeDSGvs (ORCPT ); Thu, 19 Apr 2018 02:51:48 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:44917 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751210AbeDSGvr (ORCPT ); Thu, 19 Apr 2018 02:51:47 -0400 Received: by mail-pf0-f193.google.com with SMTP id p15so2147908pff.11 for ; Wed, 18 Apr 2018 23:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=aElWJpOtrwLEtUogDowdYYjo6Z48Bjs0JSoeUdrjOm4=; b=gyiTm2h+MnjdYeewz0se4sQDWBm0OeDg99uII3MZclL1nGeYDB2TwKMqTauf9YNdjn aQUiPIddBuo30NU7yAN3UC1aS4AB/ANWWAExFVPA/DWwDS2hggLUVnENT5X+aI5+yXCt 2jCJgVNNLfAauo630DrsSmwWAaBoqqeSOlltE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=aElWJpOtrwLEtUogDowdYYjo6Z48Bjs0JSoeUdrjOm4=; b=nW6xIubqgydgRW2IDOOySnd4Km+DFn+0PCr4vlLWVVO79PP66BPcLmyx6Iugi3kDKn MCPV8/mua5M5sFdepWvI6wXsFMpNwYcGqvJvOj6oTnkFshgmRLbvtg2ci9VnnsweQBuw hB7u6h8KNz68Z1grucVwcdPldtiwAXnabfMrKQ8yqWp7Ry46l6lBeuf1foiISuw3ZN48 cg6dXmOXQFlRhaONLrRj9OJ9mEncqY8fEs9hMxDi3illlWxfk4IqUs2u3ZUqXiJ7GTCq o4hvLUeAkse51bDuJtynMIcn7YUsyVKxZEbE5LKGU4EkuUHf29pWu5aBzPegUWfmv990 MInA== X-Gm-Message-State: ALQs6tD8LsNuz9F+O7MjHfimctEwKcKzpDWnwaDWzuYYNoGGMpEhXuEZ lVeQgRcxlX/TsXZbwskACtVwnw== X-Google-Smtp-Source: AIpwx4/C1H1vmKFdcptYngaKfDRJz2dJLtFOCbVfGWcH1lrrWjj7+tNiI/MZfpVCoHS9PmaYqRtBGA== X-Received: by 10.101.102.198 with SMTP id c6mr2986086pgw.127.1524120707000; Wed, 18 Apr 2018 23:51:47 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id c26sm5343260pfj.85.2018.04.18.23.51.42 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Apr 2018 23:51:46 -0700 (PDT) From: Baolin Wang To: jejb@parisc-linux.org, deller@gmx.de Cc: alexandre.belloni@bootlin.com, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, tglx@linutronix.de, linux-parisc@vger.kernel.org, arnd@arndb.de, broonie@kernel.org, linux-kernel@vger.kernel.org, baolin.wang@linaro.org Subject: [PATCH] parisc: time: Convert read_persistent_clock() to read_persistent_clock64() Date: Thu, 19 Apr 2018 14:51:03 +0800 Message-Id: <4914b33abd8969906d2db0ae5c3da4f205f0bfe9.1524120572.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The read_persistent_clock() uses a timespec, which is not year 2038 safe on 32bit systems. On parisc architecture, we have implemented generic RTC drivers that can be used to compensate the system suspend time, but the RTC time can not represent the nanosecond resolution, so this patch just converts to read_persistent_clock64() with timespec64. Signed-off-by: Baolin Wang Acked-by: Arnd Bergmann --- arch/parisc/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index c383040..a1e772f 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c @@ -205,7 +205,7 @@ static int __init rtc_init(void) device_initcall(rtc_init); #endif -void read_persistent_clock(struct timespec *ts) +void read_persistent_clock64(struct timespec64 *ts) { static struct pdc_tod tod_data; if (pdc_tod_read(&tod_data) == 0) {