mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: fix posix hr timestamp
Fix the high reslution timestamp API in posix timer unit to return arch specific high resolution counter value. For userspace, continue using the timer based implementaion. BUG 2677936 Change-Id: I1b2015668089e6a80ee1fe4e5fa460ee896a8cec Signed-off-by: ajesh <akv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2176484 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Shashank Singh <shashsingh@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -35,4 +35,5 @@ bool nvgpu_is_soc_t194_a01(struct gk20a *g);
|
||||
int nvgpu_init_soc_vars(struct gk20a *g);
|
||||
void nvgpu_delay_usecs(unsigned int usecs);
|
||||
u64 nvgpu_us_counter(void);
|
||||
u64 nvgpu_get_cycles(void);
|
||||
#endif /* NVGPU_SOC_H */
|
||||
|
||||
@@ -61,3 +61,8 @@ u64 nvgpu_us_counter(void)
|
||||
{
|
||||
return (u64)nvgpu_current_time_us();
|
||||
}
|
||||
|
||||
u64 nvgpu_get_cycles(void)
|
||||
{
|
||||
return (u64)nvgpu_current_time_us();
|
||||
}
|
||||
|
||||
@@ -249,11 +249,7 @@ s64 nvgpu_current_time_ns(void)
|
||||
|
||||
u64 nvgpu_hr_timestamp(void)
|
||||
{
|
||||
s64 count;
|
||||
|
||||
count = nvgpu_current_time_us();
|
||||
|
||||
return nvgpu_safe_cast_s64_to_u64(count);
|
||||
return nvgpu_get_cycles();
|
||||
}
|
||||
|
||||
u64 nvgpu_hr_timestamp_us(void)
|
||||
|
||||
Reference in New Issue
Block a user