From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755301AbdKGURb (ORCPT ); Tue, 7 Nov 2017 15:17:31 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:43958 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752233AbdKGUR3 (ORCPT ); Tue, 7 Nov 2017 15:17:29 -0500 Date: Tue, 7 Nov 2017 21:17:12 +0100 (CET) From: Thomas Gleixner To: Arnd Bergmann cc: "Rafael J. Wysocki" , Len Brown , 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: Re: [PATCH] APEI/ERST: use 64-bit timestamps In-Reply-To: <20171102114320.1729239-1-arnd@arndb.de> Message-ID: References: <20171102114320.1729239-1-arnd@arndb.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Nov 2017, Arnd Bergmann wrote: > 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; > -- > 2.9.0 > >