Skip to content

Commit

Permalink
GPUDirect Storage kernel driver (nvidia-fs) ver-2.17.5 commit
Browse files Browse the repository at this point in the history
removed the use of symbol_get APIs for nvidia_p2p_* APIs.
  • Loading branch information
KiranModukuri committed Aug 30, 2023
1 parent 897f5be commit fe75b1b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 244 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
nvidia-fs (2.17.5) RELEASE; urgency=low
* removed the use of symbol_get APIs for nvidia_p2p_* APIs. nvidia-fs is restricted to NVIDIA UNIX Open Kernel Module for x86_64

-- Aug 2023
nvidia-fs (2.17.4) RELEASE; urgency=low
* Added support for Grace-Hopper platform with 4k and 64k Page support

Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ccflags-y += -Wall
ccflags-y += -I$(NVIDIA_SRC_DIR)

ccflags-y += -I/usr/lib/gcc/x86_64-linux-gnu/7/include/
nvidia-fs-y = nvfs-core.o nvfs-dma.o nvfs-mmap.o nvfs-pci.o nvfs-proc.o nvfs-mod.o nvfs-kernel-interface.o nvfs-p2p.o
nvidia-fs-y = nvfs-core.o nvfs-dma.o nvfs-mmap.o nvfs-pci.o nvfs-proc.o nvfs-mod.o nvfs-kernel-interface.o
nvidia-fs-$(CONFIG_NVFS_STATS) += nvfs-stat.o
nvidia-fs-$(CONFIG_FAULT_INJECTION) += nvfs-fault.o
GDS_VERSION ?= $(shell cat GDS_VERSION)
Expand Down
9 changes: 0 additions & 9 deletions src/nvfs-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,17 +1061,9 @@ static int nvfs_open(struct inode *inode, struct file *file)
mutex_lock(&nvfs_module_mutex);
nvfs_get_ops();

if(nvfs_nvidia_p2p_init()) {
nvfs_err("Could not load nvidia_p2p* symbols\n");
nvfs_put_ops();
ret = -EOPNOTSUPP;
goto out;
}

ret = nvfs_blk_register_dma_ops();
if (ret < 0) {
nvfs_err("nvfs modules probe failed with error :%d\n", ret);
nvfs_nvidia_p2p_exit();
nvfs_put_ops();
goto out;
}
Expand All @@ -1089,7 +1081,6 @@ static int nvfs_close(struct inode *inode, struct file *file)
nvfs_put_ops();
if (nvfs_count_ops() == 0) {
nvfs_blk_unregister_dma_ops();
nvfs_nvidia_p2p_exit();
nvfs_dbg("Unregistering dma ops and nvidia p2p ops\n");
}
mutex_unlock(&nvfs_module_mutex);
Expand Down
194 changes: 0 additions & 194 deletions src/nvfs-p2p.c

This file was deleted.

45 changes: 6 additions & 39 deletions src/nvfs-p2p.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,44 +25,11 @@

#include "nv-p2p.h"

typedef int (*nvidia_p2p_dma_unmap_pages_fptr) (struct pci_dev*,
struct nvidia_p2p_page_table*,
struct nvidia_p2p_dma_mapping*);
typedef int (*nvidia_p2p_get_pages_fptr) (uint64_t, uint32_t,
uint64_t,
uint64_t ,
struct nvidia_p2p_page_table **,
void (*free_callback)(void *data),
void *);
typedef int (*nvidia_p2p_put_pages_fptr)(uint64_t, uint32_t,
uint64_t,
struct nvidia_p2p_page_table *);
typedef int (*nvidia_p2p_dma_map_pages_fptr)(struct pci_dev *,
struct nvidia_p2p_page_table *,
struct nvidia_p2p_dma_mapping **);
typedef int (*nvidia_p2p_free_dma_mapping_fptr)(struct nvidia_p2p_dma_mapping *);
typedef int (*nvidia_p2p_free_page_table_fptr)(struct nvidia_p2p_page_table *);


int nvfs_nvidia_p2p_dma_unmap_pages(struct pci_dev *peer,
struct nvidia_p2p_page_table *page_table,
struct nvidia_p2p_dma_mapping *dma_mapping);
int nvfs_nvidia_p2p_get_pages(uint64_t p2p_token, uint32_t va_space,
uint64_t virtual_address,
uint64_t length,
struct nvidia_p2p_page_table **page_table,
void (*free_callback)(void *data),
void *data);
int nvfs_nvidia_p2p_put_pages(uint64_t p2p_token, uint32_t va_space,
uint64_t virtual_address,
struct nvidia_p2p_page_table *page_table);
int nvfs_nvidia_p2p_dma_map_pages(struct pci_dev *peer,
struct nvidia_p2p_page_table *page_table,
struct nvidia_p2p_dma_mapping **dma_mapping);
int nvfs_nvidia_p2p_free_dma_mapping(struct nvidia_p2p_dma_mapping *dma_mapping);
int nvfs_nvidia_p2p_free_page_table(struct nvidia_p2p_page_table *page_table);

int nvfs_nvidia_p2p_init(void);
void nvfs_nvidia_p2p_exit(void);
#define nvfs_nvidia_p2p_get_pages nvidia_p2p_get_pages
#define nvfs_nvidia_p2p_put_pages nvidia_p2p_put_pages
#define nvfs_nvidia_p2p_dma_map_pages nvidia_p2p_dma_map_pages
#define nvfs_nvidia_p2p_dma_unmap_pages nvidia_p2p_dma_unmap_pages
#define nvfs_nvidia_p2p_free_page_table nvidia_p2p_free_page_table
#define nvfs_nvidia_p2p_free_dma_mapping nvidia_p2p_free_dma_mapping

#endif
2 changes: 1 addition & 1 deletion src/nvfs-vers.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define NVFS_DRIVER_MINOR_VERSION 17 //2-bytes

// template for build version
#define NVFS_DRIVER_PATCH_VERSION 4
#define NVFS_DRIVER_PATCH_VERSION 5

static inline unsigned int nvfs_driver_version(void) {
return (NVFS_DRIVER_MAJOR_VERSION << 16) | NVFS_DRIVER_MINOR_VERSION;
Expand Down

0 comments on commit fe75b1b

Please sign in to comment.