Skip to content

Commit

Permalink
APEI / ERST: use 64-bit timestamps
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
arndb authored and rafaeljw committed Nov 8, 2017
1 parent 4a75aea commit c0041d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/apei/erst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c0041d4

Please sign in to comment.