From patchwork Thu Nov 2 11:42:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10038579 X-Patchwork-Delegate: rjw@sisk.pl 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 17786603B5 for ; Thu, 2 Nov 2017 11:43:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06F4328F11 for ; Thu, 2 Nov 2017 11:43:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF46128F13; Thu, 2 Nov 2017 11:43:49 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 8DE7628F11 for ; Thu, 2 Nov 2017 11:43:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750924AbdKBLns (ORCPT ); Thu, 2 Nov 2017 07:43:48 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:61585 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750722AbdKBLnr (ORCPT ); Thu, 2 Nov 2017 07:43:47 -0400 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0Le53E-1dMv3f0Nky-00ptcH; Thu, 02 Nov 2017 12:43:23 +0100 From: Arnd Bergmann To: "Rafael J. Wysocki" , Len Brown Cc: Arnd Bergmann , Kees Cook , Anton Vorontsov , Colin Cross , Tony Luck , Borislav Petkov , Michal Hocko , Andrew Morton , Leon Romanovsky , Dan Williams , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] APEI/ERST: use 64-bit timestamps Date: Thu, 2 Nov 2017 12:42:50 +0100 Message-Id: <20171102114320.1729239-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:oKaFxsAhs4MRFjzI+ckdN3zqAQ4z/N9FtAlz4+hrpxlSZODWxt2 XlXhtKVZ5EtxBqPuMQiJEYn65ZsGVHT0OwZyvuss9i1hCnqlSNrFyr/mSoGmZqP54T2Xgyh B6d3lHTQUziB9nd66/wjqZ480GPH/uOfoQstm30vUMxe2LDz1aiP9N9Qqq3xDNURWuNv5rq 2VxLvmKB5UzK6fDe2xhmA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Rb6AHN2rJRw=:silTXfN99YbdmRRUXZ90hy DmLWekQ/v+UgARwH/r51WlsVmn1JDa22lRKtmBczkeDq+NOi3jWGGRYGMTniQgxxQGlFLU+CV l2SKH18yO+b15AK5+PPRpNC+gwdNWjI5Mw1P8Qg9q1CpI5Lq/KZUwjrQyotST6mozm6oZKkB7 vCrIryydN5RA1sf0D+58mqJ9UC24Nm8sMiRFjWwelsxefiyaslUoXvJFrBrUCjB3nOX6bQkg/ WoBq+pIVLQWQvEZVu8FCcopZoFhg2SF9o3FIf085jJ+pdWiTKGxB6o64aVDbDyKbsAbpSUvmy cgfxLhs0arpcV+yfYnsrHN0gUuhDIw1RJfYwzjQW9r7VsPtbV6AhhtsVP9d2ABgOTS/yZ8rLQ i5UzpwsAa8fs5Uxgc8uBRgLSaQw6CZMiDu7saj28PFVylFclHKQvdxYECWuWi+iDICGLpJqaJ 6XSf7c1sIR/gld9nz9CVWM1JJHWeonYgz5/C0HOmTU9urHoUkQxLfGCrqiSx63gio80Kty5+W 4fmb7KVZoI8kgBnMJsJYWSnUsHAt0L4Z3JDSb7Ermet7UoazpMU88EWE3GrJ150rcxmtzEQ4Y iGtklp6JFAwYQ2b8Ym7br/YQAFMNdOPZ8BypdNsJ8OuknnEvQAUKa3mgkqFK94yVunPcxEAfJ byDENzatofa3B17H/zQNkCGVNpBnvOEGWAEzec5iUsCYJSWx5a8vKkqKuyBmORpvkZvLxv31L wbZEBExxZmX3/runArDkDnbysbijv31qshOc4A== Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 32-bit timestamps are deprecated in the kernel, so we should not use get_seconds(). In this case, the 'struct cper_record_header' structure already contains a 64-bit field, so the only required change is to use the safe ktime_get_real_seconds() interface as a replacement. Signed-off-by: Arnd Bergmann Reviewed-by: Thomas Gleixner --- drivers/acpi/apei/erst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index 2c462beee551..6742f6c68034 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -1061,7 +1061,7 @@ static int erst_writer(struct pstore_record *record) rcd->hdr.error_severity = CPER_SEV_FATAL; /* timestamp valid. platform_id, partition_id are invalid */ rcd->hdr.validation_bits = CPER_VALID_TIMESTAMP; - rcd->hdr.timestamp = get_seconds(); + rcd->hdr.timestamp = ktime_get_real_seconds(); rcd->hdr.record_length = sizeof(*rcd) + record->size; rcd->hdr.creator_id = CPER_CREATOR_PSTORE; rcd->hdr.notification_type = CPER_NOTIFY_MCE;