mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-21 15:33:58 +00:00
570.86.15
This commit is contained in:
@@ -159,43 +159,3 @@ void nv_unregister_rsync_driver(
|
||||
|
||||
up(&g_rsync_info.lock);
|
||||
}
|
||||
|
||||
NvBool nv_get_rsync_relaxed_ordering_mode(
|
||||
nv_state_t *nv
|
||||
)
|
||||
{
|
||||
nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
|
||||
|
||||
/* shouldn't be called without opening a device */
|
||||
WARN_ON(NV_ATOMIC_READ(nvl->usage_count) == 0);
|
||||
|
||||
/*
|
||||
* g_rsync_info.relaxed_ordering_mode can be safely accessed outside of
|
||||
* g_rsync_info.lock once a device is opened. During nvidia_open(), we
|
||||
* lock the relaxed ordering state by ref-counting the rsync module
|
||||
* through get_relaxed_ordering_mode.
|
||||
*/
|
||||
return g_rsync_info.relaxed_ordering_mode;
|
||||
}
|
||||
|
||||
void nv_wait_for_rsync(
|
||||
nv_state_t *nv
|
||||
)
|
||||
{
|
||||
nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
|
||||
|
||||
/* shouldn't be called without opening a device */
|
||||
WARN_ON(NV_ATOMIC_READ(nvl->usage_count) == 0);
|
||||
|
||||
/*
|
||||
* g_rsync_info.relaxed_ordering_mode can be safely accessed outside of
|
||||
* g_rsync_info.lock once a device is opened. During nvidia_open(), we
|
||||
* block unregistration of the rsync driver by ref-counting the module
|
||||
* through get_relaxed_ordering_mode.
|
||||
*/
|
||||
if (g_rsync_info.relaxed_ordering_mode)
|
||||
{
|
||||
WARN_ON(g_rsync_info.wait_for_rsync == NULL);
|
||||
g_rsync_info.wait_for_rsync(nvl->pci_dev, g_rsync_info.data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user