Skip to content

Commit 498793d

Browse files
committed
570.211.01
1 parent a973de2 commit 498793d

18 files changed

Lines changed: 194 additions & 61 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NVIDIA Linux Open GPU Kernel Module Source
22

33
This is the source release of the NVIDIA Linux open GPU kernel modules,
4-
version 570.207.
4+
version 570.211.01.
55

66

77
## How to Build
@@ -17,7 +17,7 @@ as root:
1717

1818
Note that the kernel modules built here must be used with GSP
1919
firmware and user-space NVIDIA GPU driver components from a corresponding
20-
570.207 driver release. This can be achieved by installing
20+
570.211.01 driver release. This can be achieved by installing
2121
the NVIDIA GPU driver from the .run file using the `--no-kernel-modules`
2222
option. E.g.,
2323

@@ -185,7 +185,7 @@ table below).
185185
For details on feature support and limitations, see the NVIDIA GPU driver
186186
end user README here:
187187

188-
https://us.download.nvidia.com/XFree86/Linux-x86_64/570.207/README/kernel_open.html
188+
https://us.download.nvidia.com/XFree86/Linux-x86_64/570.211.01/README/kernel_open.html
189189

190190
For vGPU support, please refer to the README.vgpu packaged in the vGPU Host
191191
Package for more details.

kernel-open/Kbuild

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ccflags-y += -I$(src)/common/inc
7979
ccflags-y += -I$(src)
8080
ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
8181
ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
82-
ccflags-y += -DNV_VERSION_STRING=\"570.207\"
82+
ccflags-y += -DNV_VERSION_STRING=\"570.211.01\"
8383

8484
ifneq ($(SYSSRCHOST1X),)
8585
ccflags-y += -I$(SYSSRCHOST1X)
@@ -181,6 +181,7 @@ NV_CONFTEST_CFLAGS += $(filter -std=%,$(KBUILD_CFLAGS))
181181
NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
182182
NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
183183
NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
184+
NV_CONFTEST_CFLAGS += $(call cc-option,-fms-extensions,)
184185
NV_CONFTEST_CFLAGS += -Wno-error
185186

186187
NV_CONFTEST_COMPILE_TEST_HEADERS := $(obj)/conftest/macros.h

kernel-open/common/inc/nv-linux.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,9 @@ static inline dma_addr_t nv_phys_to_dma(struct device *dev, NvU64 pa)
833833
#define NV_PRINT_AT(nv_debug_level,at) \
834834
{ \
835835
nv_printf(nv_debug_level, \
836-
"NVRM: VM: %s:%d: 0x%p, %d page(s), count = %d, " \
836+
"NVRM: VM: %s:%d: 0x%p, %d page(s), count = %lld, " \
837837
"page_table = 0x%p\n", __FUNCTION__, __LINE__, at, \
838-
at->num_pages, NV_ATOMIC_READ(at->usage_count), \
838+
at->num_pages, (long long)atomic64_read(&at->usage_count), \
839839
at->page_table); \
840840
}
841841

@@ -1174,7 +1174,7 @@ struct nv_dma_buf
11741174
typedef struct nv_alloc_s {
11751175
struct nv_alloc_s *next;
11761176
struct device *dev;
1177-
atomic_t usage_count;
1177+
atomic64_t usage_count;
11781178
struct {
11791179
NvBool contig : 1;
11801180
NvBool guest : 1;
@@ -1486,7 +1486,7 @@ typedef struct
14861486
typedef struct nv_linux_state_s {
14871487
nv_state_t nv_state;
14881488

1489-
atomic_t usage_count;
1489+
atomic64_t usage_count;
14901490

14911491
NvU32 suspend_count;
14921492

@@ -1825,9 +1825,9 @@ static inline NvBool nv_alloc_release(nv_linux_file_private_t *nvlfp, nv_alloc_t
18251825
{
18261826
NV_PRINT_AT(NV_DBG_MEMINFO, at);
18271827

1828-
if (NV_ATOMIC_DEC_AND_TEST(at->usage_count))
1828+
if (atomic64_dec_and_test(&at->usage_count))
18291829
{
1830-
NV_ATOMIC_INC(at->usage_count);
1830+
atomic64_inc(&at->usage_count);
18311831

18321832
at->next = nvlfp->free_list;
18331833
nvlfp->free_list = at;

kernel-open/header-presence-tests.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
NV_HEADER_PRESENCE_TESTS = \
44
asm/system.h \
55
drm/drmP.h \
6+
drm/drm_print.h \
67
drm/drm_aperture.h \
78
drm/drm_auth.h \
89
drm/drm_gem.h \

kernel-open/nvidia-drm/nvidia-drm-priv.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
#include <drm/drmP.h>
3232
#endif
3333

34+
#if defined(NV_DRM_PRINT_H_PRESENT)
35+
#include <drm/drm_print.h>
36+
#endif
37+
3438
#if defined(NV_DRM_DRM_DEVICE_H_PRESENT)
3539
#include <drm/drm_device.h>
3640
#endif

kernel-open/nvidia/nv-mmap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ nvidia_vma_open(struct vm_area_struct *vma)
7272

7373
if (at != NULL)
7474
{
75-
NV_ATOMIC_INC(at->usage_count);
75+
atomic64_inc(&at->usage_count);
7676

7777
NV_PRINT_AT(NV_DBG_MEMINFO, at);
7878
}
@@ -423,7 +423,7 @@ static int nvidia_mmap_sysmem(
423423
int ret = 0;
424424
unsigned long start = 0;
425425

426-
NV_ATOMIC_INC(at->usage_count);
426+
atomic64_inc(&at->usage_count);
427427

428428
start = vma->vm_start;
429429
for (j = page_index; j < (page_index + pages); j++)
@@ -459,7 +459,7 @@ static int nvidia_mmap_sysmem(
459459

460460
if (ret)
461461
{
462-
NV_ATOMIC_DEC(at->usage_count);
462+
atomic64_dec(&at->usage_count);
463463
return -EAGAIN;
464464
}
465465
start += PAGE_SIZE;

kernel-open/nvidia/nv-pci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ nv_pci_remove(struct pci_dev *pci_dev)
10301030
* For eGPU, fall off the bus along with clients active is a valid scenario.
10311031
* Hence skipping the sanity check for eGPU.
10321032
*/
1033-
if ((NV_ATOMIC_READ(nvl->usage_count) != 0) && !(nv->is_external_gpu))
1033+
if ((atomic64_read(&nvl->usage_count) != 0) && !(nv->is_external_gpu))
10341034
{
10351035
nv_printf(NV_DBG_ERRORS,
10361036
"NVRM: Attempting to remove device %04x:%02x:%02x.%x with non-zero usage count!\n",
@@ -1041,7 +1041,7 @@ nv_pci_remove(struct pci_dev *pci_dev)
10411041
* We can't return from this function without corrupting state, so we wait for
10421042
* the usage count to go to zero.
10431043
*/
1044-
while (NV_ATOMIC_READ(nvl->usage_count) != 0)
1044+
while (atomic64_read(&nvl->usage_count) != 0)
10451045
{
10461046

10471047
/*
@@ -1113,7 +1113,7 @@ nv_pci_remove(struct pci_dev *pci_dev)
11131113
nvl->sysfs_config_file = NULL;
11141114
}
11151115

1116-
if (NV_ATOMIC_READ(nvl->usage_count) == 0)
1116+
if (atomic64_read(&nvl->usage_count) == 0)
11171117
{
11181118
nv_lock_destroy_locks(sp, nv);
11191119
}
@@ -1129,7 +1129,7 @@ nv_pci_remove(struct pci_dev *pci_dev)
11291129

11301130
num_nv_devices--;
11311131

1132-
if (NV_ATOMIC_READ(nvl->usage_count) == 0)
1132+
if (atomic64_read(&nvl->usage_count) == 0)
11331133
{
11341134
NV_PCI_DISABLE_DEVICE(pci_dev);
11351135
NV_KFREE(nvl, sizeof(nv_linux_state_t));

kernel-open/nvidia/nv-procfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ nv_procfs_close_unbind_lock(
886886
down(&nvl->ldata_lock);
887887
if ((value == 1) && !(nv->flags & NV_FLAG_UNBIND_LOCK))
888888
{
889-
if (NV_ATOMIC_READ(nvl->usage_count) == 0)
889+
if (atomic64_read(&nvl->usage_count) == 0)
890890
rm_unbind_lock(sp, nv);
891891

892892
if (nv->flags & NV_FLAG_UNBIND_LOCK)

kernel-open/nvidia/nv.c

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ nv_alloc_t *nvos_create_alloc(
356356
}
357357

358358
memset(at->page_table, 0, pt_size);
359-
NV_ATOMIC_SET(at->usage_count, 0);
359+
atomic64_set(&at->usage_count, 0);
360360

361361
for (i = 0; i < at->num_pages; i++)
362362
{
@@ -386,7 +386,7 @@ int nvos_free_alloc(
386386
if (at == NULL)
387387
return -1;
388388

389-
if (NV_ATOMIC_READ(at->usage_count))
389+
if (atomic64_read(&at->usage_count))
390390
return 1;
391391

392392
for (i = 0; i < at->num_pages; i++)
@@ -1598,13 +1598,10 @@ static int nv_open_device(nv_state_t *nv, nvidia_stack_t *sp)
15981598
return -ENODEV;
15991599
}
16001600

1601-
if (unlikely(NV_ATOMIC_READ(nvl->usage_count) >= NV_S32_MAX))
1602-
return -EMFILE;
1603-
16041601
if ( ! (nv->flags & NV_FLAG_OPEN))
16051602
{
16061603
/* Sanity check: !NV_FLAG_OPEN requires usage_count == 0 */
1607-
if (NV_ATOMIC_READ(nvl->usage_count) != 0)
1604+
if (atomic64_read(&nvl->usage_count) != 0)
16081605
{
16091606
NV_DEV_PRINTF(NV_DBG_ERRORS, nv,
16101607
"Minor device %u is referenced without being open!\n",
@@ -1626,7 +1623,7 @@ static int nv_open_device(nv_state_t *nv, nvidia_stack_t *sp)
16261623

16271624
nv_assert_not_in_gpu_exclusion_list(sp, nv);
16281625

1629-
NV_ATOMIC_INC(nvl->usage_count);
1626+
atomic64_inc(&nvl->usage_count);
16301627

16311628
return 0;
16321629
}
@@ -2065,7 +2062,7 @@ static void nv_close_device(nv_state_t *nv, nvidia_stack_t *sp)
20652062
{
20662063
nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
20672064

2068-
if (NV_ATOMIC_READ(nvl->usage_count) == 0)
2065+
if (atomic64_read(&nvl->usage_count) == 0)
20692066
{
20702067
nv_printf(NV_DBG_ERRORS,
20712068
"NVRM: Attempting to close unopened minor device %u!\n",
@@ -2074,7 +2071,7 @@ static void nv_close_device(nv_state_t *nv, nvidia_stack_t *sp)
20742071
return;
20752072
}
20762073

2077-
if (NV_ATOMIC_DEC_AND_TEST(nvl->usage_count))
2074+
if (atomic64_dec_and_test(&nvl->usage_count))
20782075
nv_stop_device(nv, sp);
20792076
}
20802077

@@ -2119,7 +2116,7 @@ nvidia_close_callback(
21192116
nv_close_device(nv, sp);
21202117

21212118
bRemove = (!NV_IS_DEVICE_IN_SURPRISE_REMOVAL(nv)) &&
2122-
(NV_ATOMIC_READ(nvl->usage_count) == 0) &&
2119+
(atomic64_read(&nvl->usage_count) == 0) &&
21232120
rm_get_device_remove_flag(sp, nv->gpu_id);
21242121

21252122
nv_free_file_private(nvlfp);
@@ -2138,7 +2135,7 @@ nvidia_close_callback(
21382135
* any cleanup related to linux layer locks and nv linux state struct.
21392136
* nvidia_pci_remove when scheduled will do necessary cleanup.
21402137
*/
2141-
if ((NV_ATOMIC_READ(nvl->usage_count) == 0) && nv->removed)
2138+
if ((atomic64_read(&nvl->usage_count) == 0) && nv->removed)
21422139
{
21432140
nv_lock_destroy_locks(sp, nv);
21442141
NV_KFREE(nvl, sizeof(nv_linux_state_t));
@@ -2659,7 +2656,7 @@ nvidia_ioctl(
26592656
* Only the current client should have an open file
26602657
* descriptor for the device, to allow safe offlining.
26612658
*/
2662-
if (NV_ATOMIC_READ(nvl->usage_count) > 1)
2659+
if (atomic64_read(&nvl->usage_count) > 1)
26632660
{
26642661
status = -EBUSY;
26652662
goto unlock;
@@ -3048,12 +3045,12 @@ nvidia_ctl_open(
30483045
/* save the nv away in file->private_data */
30493046
nvlfp->nvptr = nvl;
30503047

3051-
if (NV_ATOMIC_READ(nvl->usage_count) == 0)
3048+
if (atomic64_read(&nvl->usage_count) == 0)
30523049
{
30533050
nv->flags |= (NV_FLAG_OPEN | NV_FLAG_CONTROL);
30543051
}
30553052

3056-
NV_ATOMIC_INC(nvl->usage_count);
3053+
atomic64_inc(&nvl->usage_count);
30573054
up(&nvl->ldata_lock);
30583055

30593056
return 0;
@@ -3078,7 +3075,7 @@ nvidia_ctl_close(
30783075
nv_printf(NV_DBG_INFO, "NVRM: nvidia_ctl_close\n");
30793076

30803077
down(&nvl->ldata_lock);
3081-
if (NV_ATOMIC_DEC_AND_TEST(nvl->usage_count))
3078+
if (atomic64_dec_and_test(&nvl->usage_count))
30823079
{
30833080
nv->flags &= ~NV_FLAG_OPEN;
30843081
}
@@ -3243,7 +3240,7 @@ nv_alias_pages(
32433240

32443241
at->guest_id = guest_id;
32453242
*priv_data = at;
3246-
NV_ATOMIC_INC(at->usage_count);
3243+
atomic64_inc(&at->usage_count);
32473244

32483245
NV_PRINT_AT(NV_DBG_MEMINFO, at);
32493246

@@ -3810,7 +3807,7 @@ NV_STATUS NV_API_CALL nv_alloc_pages(
38103807
}
38113808

38123809
*priv_data = at;
3813-
NV_ATOMIC_INC(at->usage_count);
3810+
atomic64_inc(&at->usage_count);
38143811

38153812
NV_PRINT_AT(NV_DBG_MEMINFO, at);
38163813

@@ -3846,7 +3843,7 @@ NV_STATUS NV_API_CALL nv_free_pages(
38463843
* This is described in greater detail in the comments above the
38473844
* nvidia_vma_(open|release)() callbacks in nv-mmap.c.
38483845
*/
3849-
if (!NV_ATOMIC_DEC_AND_TEST(at->usage_count))
3846+
if (!atomic64_dec_and_test(&at->usage_count))
38503847
return NV_OK;
38513848

38523849
if (!at->flags.guest)
@@ -3875,7 +3872,7 @@ NvBool nv_lock_init_locks
38753872
NV_INIT_MUTEX(&nvl->mmap_lock);
38763873
NV_INIT_MUTEX(&nvl->open_q_lock);
38773874

3878-
NV_ATOMIC_SET(nvl->usage_count, 0);
3875+
atomic64_set(&nvl->usage_count, 0);
38793876

38803877
if (!rm_init_event_locks(sp, nv))
38813878
return NV_FALSE;

src/common/inc/nvBldVer.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@
3636
// and then checked back in. You cannot make changes to these sections without
3737
// corresponding changes to the buildmeister script
3838
#ifndef NV_BUILD_BRANCH
39-
#define NV_BUILD_BRANCH r570_00
39+
#define NV_BUILD_BRANCH r573_96
4040
#endif
4141
#ifndef NV_PUBLIC_BRANCH
42-
#define NV_PUBLIC_BRANCH r570_00
42+
#define NV_PUBLIC_BRANCH r573_96
4343
#endif
4444

4545
#if defined(NV_LINUX) || defined(NV_BSD) || defined(NV_SUNOS)
46-
#define NV_BUILD_BRANCH_VERSION "rel/gpu_drv/r570/r570_00-658"
47-
#define NV_BUILD_CHANGELIST_NUM (36886698)
46+
#define NV_BUILD_BRANCH_VERSION "rel/gpu_drv/r570/r573_96-1"
47+
#define NV_BUILD_CHANGELIST_NUM (36945344)
4848
#define NV_BUILD_TYPE "Official"
49-
#define NV_BUILD_NAME "rel/gpu_drv/r570/r570_00-658"
50-
#define NV_LAST_OFFICIAL_CHANGELIST_NUM (36886698)
49+
#define NV_BUILD_NAME "rel/gpu_drv/r570/r573_96-1"
50+
#define NV_LAST_OFFICIAL_CHANGELIST_NUM (36945344)
5151

5252
#else /* Windows builds */
53-
#define NV_BUILD_BRANCH_VERSION "r570_00-640"
54-
#define NV_BUILD_CHANGELIST_NUM (36886698)
53+
#define NV_BUILD_BRANCH_VERSION "r573_96-648"
54+
#define NV_BUILD_CHANGELIST_NUM (36918590)
5555
#define NV_BUILD_TYPE "Official"
56-
#define NV_BUILD_NAME "573.92"
57-
#define NV_LAST_OFFICIAL_CHANGELIST_NUM (36886698)
56+
#define NV_BUILD_NAME "573.95"
57+
#define NV_LAST_OFFICIAL_CHANGELIST_NUM (36918590)
5858
#define NV_BUILD_BRANCH_BASE_VERSION R570
5959
#endif
6060
// End buildmeister python edited section

0 commit comments

Comments
 (0)