mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-01-30 04:59:46 +00:00
580.94.16
This commit is contained in:
@@ -693,9 +693,9 @@ static inline dma_addr_t nv_phys_to_dma(struct device *dev, NvU64 pa)
|
||||
#define NV_PRINT_AT(nv_debug_level,at) \
|
||||
{ \
|
||||
nv_printf(nv_debug_level, \
|
||||
"NVRM: VM: %s:%d: 0x%p, %d page(s), count = %d, " \
|
||||
"NVRM: VM: %s:%d: 0x%p, %d page(s), count = %lld, " \
|
||||
"page_table = 0x%p\n", __FUNCTION__, __LINE__, at, \
|
||||
at->num_pages, NV_ATOMIC_READ(at->usage_count), \
|
||||
at->num_pages, (long long)atomic64_read(&at->usage_count), \
|
||||
at->page_table); \
|
||||
}
|
||||
|
||||
@@ -970,7 +970,7 @@ struct nv_dma_buf
|
||||
typedef struct nv_alloc_s {
|
||||
struct nv_alloc_s *next;
|
||||
struct device *dev;
|
||||
atomic_t usage_count;
|
||||
atomic64_t usage_count;
|
||||
struct {
|
||||
NvBool contig : 1;
|
||||
NvBool guest : 1;
|
||||
@@ -1258,6 +1258,10 @@ typedef struct coherent_link_info_s {
|
||||
* of virutalized OS environment it is Intermediate Physical Address(IPA) */
|
||||
NvU64 gpu_mem_pa;
|
||||
|
||||
/* Size of the GPU memory mappable through coherent link. It is possible
|
||||
that less than whole FB is mapped to CPU. */
|
||||
NvU64 gpu_mem_size;
|
||||
|
||||
/* Physical address of the reserved portion of the GPU memory, applicable
|
||||
* only in Grace Hopper self hosted passthrough virtualizatioan platform. */
|
||||
NvU64 rsvd_mem_pa;
|
||||
@@ -1294,7 +1298,7 @@ struct nv_pci_tegra_devfreq_dev;
|
||||
typedef struct nv_linux_state_s {
|
||||
nv_state_t nv_state;
|
||||
|
||||
atomic_t usage_count;
|
||||
atomic64_t usage_count;
|
||||
|
||||
NvU32 suspend_count;
|
||||
|
||||
@@ -1670,9 +1674,9 @@ static inline NvBool nv_alloc_release(nv_linux_file_private_t *nvlfp, nv_alloc_t
|
||||
{
|
||||
NV_PRINT_AT(NV_DBG_MEMINFO, at);
|
||||
|
||||
if (NV_ATOMIC_DEC_AND_TEST(at->usage_count))
|
||||
if (atomic64_dec_and_test(&at->usage_count))
|
||||
{
|
||||
NV_ATOMIC_INC(at->usage_count);
|
||||
atomic64_inc(&at->usage_count);
|
||||
|
||||
at->next = nvlfp->free_list;
|
||||
nvlfp->free_list = at;
|
||||
|
||||
@@ -196,14 +196,33 @@ static inline struct rw_semaphore *nv_mmap_get_lock(struct mm_struct *mm)
|
||||
* Commit 45ad9f5290dc updated vma_start_write() to call __vma_start_write().
|
||||
*/
|
||||
void nv_vma_start_write(struct vm_area_struct *);
|
||||
|
||||
static inline void nv_vma_flags_set_word(struct vm_area_struct *vma, unsigned long flags)
|
||||
{
|
||||
nv_vma_start_write(vma);
|
||||
#if defined(NV_VMA_FLAGS_SET_WORD_PRESENT)
|
||||
vma_flags_set_word(&vma->flags, flags);
|
||||
#else
|
||||
ACCESS_PRIVATE(vma, __vm_flags) |= flags;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void nv_vma_flags_clear_word(struct vm_area_struct *vma, unsigned long flags)
|
||||
{
|
||||
nv_vma_start_write(vma);
|
||||
#if defined(NV_VMA_FLAGS_SET_WORD_PRESENT)
|
||||
vma_flags_clear_word(&vma->flags, flags);
|
||||
#else
|
||||
ACCESS_PRIVATE(vma, __vm_flags) &= ~flags;
|
||||
#endif
|
||||
}
|
||||
#endif // !NV_CAN_CALL_VMA_START_WRITE
|
||||
|
||||
static inline void nv_vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
|
||||
{
|
||||
#if !NV_CAN_CALL_VMA_START_WRITE
|
||||
nv_vma_start_write(vma);
|
||||
ACCESS_PRIVATE(vma, __vm_flags) |= flags;
|
||||
#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
|
||||
nv_vma_flags_set_word(vma, flags);
|
||||
#elif defined(NV_VM_FLAGS_SET_PRESENT)
|
||||
vm_flags_set(vma, flags);
|
||||
#else
|
||||
vma->vm_flags |= flags;
|
||||
@@ -213,9 +232,8 @@ static inline void nv_vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
|
||||
static inline void nv_vm_flags_clear(struct vm_area_struct *vma, vm_flags_t flags)
|
||||
{
|
||||
#if !NV_CAN_CALL_VMA_START_WRITE
|
||||
nv_vma_start_write(vma);
|
||||
ACCESS_PRIVATE(vma, __vm_flags) &= ~flags;
|
||||
#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
|
||||
nv_vma_flags_clear_word(vma, flags);
|
||||
#elif defined(NV_VM_FLAGS_SET_PRESENT)
|
||||
vm_flags_clear(vma, flags);
|
||||
#else
|
||||
vma->vm_flags &= ~flags;
|
||||
|
||||
@@ -959,7 +959,7 @@ void NV_API_CALL nv_put_firmware(const void *);
|
||||
nv_file_private_t* NV_API_CALL nv_get_file_private(NvS32, NvBool, void **);
|
||||
void NV_API_CALL nv_put_file_private(void *);
|
||||
|
||||
NV_STATUS NV_API_CALL nv_get_device_memory_config(nv_state_t *, NvU64 *, NvU64 *, NvU64 *, NvU32 *, NvS32 *);
|
||||
NV_STATUS NV_API_CALL nv_get_device_memory_config(nv_state_t *, NvU64 *, NvU64 *, NvU64 *, NvU64 *, NvU32 *, NvS32 *);
|
||||
NV_STATUS NV_API_CALL nv_get_egm_info(nv_state_t *, NvU64 *, NvU64 *, NvS32 *);
|
||||
|
||||
void NV_API_CALL nv_p2p_free_platform_data(void *data);
|
||||
|
||||
Reference in New Issue
Block a user