gpu: nvgpu: use timespec64

Due to y2038 problem, where timestamps will overflow if logged in 32bit
values, upstream linux kernel has removed timespec and friends.

Correpsonding jiffies conversion functions are also obsolete. Update
the notifier timestamp setup code to comply with this.

Bug 2925664

Change-Id: I5266e3d748e536175af8eff5111fcc54556332a8
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2326514
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Sagar Kamble
2020-04-13 13:38:10 +05:30
committed by Alex Waterman
parent 0119aedbe5
commit 705dd2ad77
3 changed files with 5 additions and 7 deletions

View File

@@ -121,12 +121,11 @@ void nvgpu_set_err_notifier_locked(struct nvgpu_channel *ch, u32 error)
if (priv->error_notifier.dmabuf) {
struct nvgpu_notification *notification =
priv->error_notifier.notification;
struct timespec time_data;
struct timespec64 time_data;
u64 nsec;
getnstimeofday(&time_data);
nsec = ((u64)time_data.tv_sec) * 1000000000u +
(u64)time_data.tv_nsec;
ktime_get_real_ts64(&time_data);
nsec = time_data.tv_sec * 1000000000u + time_data.tv_nsec;
notification->time_stamp.nanoseconds[0] =
(u32)nsec;
notification->time_stamp.nanoseconds[1] =