diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h index 6466318a0..12a507ed3 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h @@ -32,7 +32,6 @@ struct gk20a; struct nvgpu_nvhost_dev; struct sync_pt; struct sync_fence; -struct timespec; /** * @file Functions that initialize the sync points diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c index 0fba35576..d15e6bac1 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c @@ -685,7 +685,7 @@ static int gk20a_channel_wait(struct nvgpu_channel *ch, struct dma_buf *dmabuf; struct gk20a *g = ch->g; struct notification *notif; - struct timespec tv; + struct timespec64 tv; u64 jiffies; ulong id; u32 offset; @@ -745,7 +745,7 @@ static int gk20a_channel_wait(struct nvgpu_channel *ch, /* TBD: fill in correct information */ jiffies = get_jiffies_64(); - jiffies_to_timespec(jiffies, &tv); + jiffies_to_timespec64(jiffies, &tv); notif->timestamp.nanoseconds[0] = tv.tv_nsec; notif->timestamp.nanoseconds[1] = tv.tv_sec; notif->info32 = 0xDEADBEEF; /* should be object name */ diff --git a/drivers/gpu/nvgpu/os/linux/linux-channel.c b/drivers/gpu/nvgpu/os/linux/linux-channel.c index f8e4a2703..fd2e47d36 100644 --- a/drivers/gpu/nvgpu/os/linux/linux-channel.c +++ b/drivers/gpu/nvgpu/os/linux/linux-channel.c @@ -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] =