Linux ACPI
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>, Kees Cook <keescook@chromium.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	Borislav Petkov <bp@alien8.de>, Michal Hocko <mhocko@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Leon Romanovsky <leonro@mellanox.com>,
	Dan Williams <dan.j.williams@intel.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] APEI/ERST: use 64-bit timestamps
Date: Tue, 7 Nov 2017 21:17:12 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1711072117000.4871@nanos> (raw)
In-Reply-To: <20171102114320.1729239-1-arnd@arndb.de>

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 <arnd@arndb.de>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

> ---
>  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
> 
> 

      reply	other threads:[~2017-11-07 20:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 11:42 [PATCH] APEI/ERST: use 64-bit timestamps Arnd Bergmann
2017-11-07 20:17 ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1711072117000.4871@nanos \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=anton@enomsg.org \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=ccross@android.com \
    --cc=dan.j.williams@intel.com \
    --cc=keescook@chromium.org \
    --cc=lenb@kernel.org \
    --cc=leonro@mellanox.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=rjw@rjwysocki.net \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox