mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-25 17:33:58 +00:00
575.57.08
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -150,8 +150,13 @@ void NV_API_CALL nv_create_nano_timer(
|
||||
nv_nstimer->nv_nano_timer_callback = nvidia_nano_timer_callback;
|
||||
|
||||
#if NV_NANO_TIMER_USE_HRTIMER
|
||||
#if NV_IS_EXPORT_SYMBOL_PRESENT_hrtimer_setup
|
||||
hrtimer_setup(&nv_nstimer->hr_timer, &nv_nano_timer_callback_typed_data,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
#else
|
||||
hrtimer_init(&nv_nstimer->hr_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
nv_nstimer->hr_timer.function = nv_nano_timer_callback_typed_data;
|
||||
#endif // NV_IS_EXPORT_SYMBOL_PRESENT_hrtimer_setup
|
||||
#else
|
||||
#if defined(NV_TIMER_SETUP_PRESENT)
|
||||
timer_setup(&nv_nstimer->jiffy_timer, nv_jiffy_timer_callback_typed_data, 0);
|
||||
@@ -203,7 +208,7 @@ void NV_API_CALL nv_cancel_nano_timer(
|
||||
#if NV_NANO_TIMER_USE_HRTIMER
|
||||
hrtimer_cancel(&nv_nstimer->hr_timer);
|
||||
#else
|
||||
del_timer_sync(&nv_nstimer->jiffy_timer);
|
||||
nv_timer_delete_sync(&nv_nstimer->jiffy_timer);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user