mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-25 01:13:59 +00:00
575.51.02
This commit is contained in:
@@ -26,12 +26,11 @@
|
||||
|
||||
#include "uvm_linux.h"
|
||||
#include "uvm_forward_decl.h"
|
||||
#include "uvm_ats_ibm.h"
|
||||
#include "nv_uvm_types.h"
|
||||
#include "uvm_lock.h"
|
||||
#include "uvm_ats_sva.h"
|
||||
|
||||
#define UVM_ATS_SUPPORTED() (UVM_ATS_IBM_SUPPORTED() || UVM_ATS_SVA_SUPPORTED())
|
||||
#define UVM_ATS_SUPPORTED() UVM_ATS_SVA_SUPPORTED()
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -43,12 +42,7 @@ typedef struct
|
||||
// being called in ats_compute_residency_mask().
|
||||
uvm_rw_semaphore_t lock;
|
||||
|
||||
union
|
||||
{
|
||||
uvm_ibm_va_space_t ibm;
|
||||
|
||||
uvm_sva_va_space_t sva;
|
||||
};
|
||||
uvm_sva_va_space_t sva;
|
||||
} uvm_ats_va_space_t;
|
||||
|
||||
typedef struct
|
||||
@@ -61,12 +55,7 @@ typedef struct
|
||||
|
||||
NvU32 pasid;
|
||||
|
||||
union
|
||||
{
|
||||
uvm_ibm_gpu_va_space_t ibm;
|
||||
|
||||
uvm_sva_gpu_va_space_t sva;
|
||||
};
|
||||
uvm_sva_gpu_va_space_t sva;
|
||||
} uvm_ats_gpu_va_space_t;
|
||||
|
||||
// Initializes driver-wide ATS state
|
||||
@@ -74,11 +63,6 @@ typedef struct
|
||||
// LOCKING: None
|
||||
void uvm_ats_init(const UvmPlatformInfo *platform_info);
|
||||
|
||||
// Initializes ATS specific GPU state
|
||||
//
|
||||
// LOCKING: None
|
||||
void uvm_ats_init_va_space(uvm_va_space_t *va_space);
|
||||
|
||||
// Enables ATS feature on the GPU.
|
||||
//
|
||||
// LOCKING: g_uvm_global.global lock mutex must be held.
|
||||
@@ -115,8 +99,6 @@ void uvm_ats_unbind_gpu(uvm_gpu_va_space_t *gpu_va_space);
|
||||
//
|
||||
// LOCKING: The VA space lock must be held in write mode.
|
||||
// mm has to be retained prior to calling this function.
|
||||
// current->mm->mmap_lock must be held in write mode iff
|
||||
// UVM_ATS_IBM_SUPPORTED_IN_KERNEL() is 1.
|
||||
NV_STATUS uvm_ats_register_gpu_va_space(uvm_gpu_va_space_t *gpu_va_space);
|
||||
|
||||
// Disables ATS access for the gpu_va_space. Prior to calling this function,
|
||||
@@ -124,19 +106,8 @@ NV_STATUS uvm_ats_register_gpu_va_space(uvm_gpu_va_space_t *gpu_va_space);
|
||||
// accesses in this GPU VA space, and that no ATS fault handling for this
|
||||
// GPU will be attempted.
|
||||
//
|
||||
// LOCKING: This function may block on mmap_lock and will acquire the VA space
|
||||
// lock, so neither lock must be held.
|
||||
// LOCKING: This function will acquire the VA space lock, so it must not be
|
||||
// held.
|
||||
void uvm_ats_unregister_gpu_va_space(uvm_gpu_va_space_t *gpu_va_space);
|
||||
|
||||
// Synchronously invalidate ATS translations cached by GPU TLBs. The
|
||||
// invalidate applies to all GPUs with active GPU VA spaces in va_space, and
|
||||
// covers all pages touching any part of the given range. end is inclusive.
|
||||
//
|
||||
// GMMU translations in the given range are not guaranteed to be
|
||||
// invalidated.
|
||||
//
|
||||
// LOCKING: No locks are required, but this function may be called with
|
||||
// interrupts disabled.
|
||||
void uvm_ats_invalidate(uvm_va_space_t *va_space, NvU64 start, NvU64 end);
|
||||
|
||||
#endif // __UVM_ATS_H__
|
||||
|
||||
Reference in New Issue
Block a user