mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-01-30 13:09:47 +00:00
525.147.05
This commit is contained in:
@@ -506,8 +506,13 @@ static int nv_p2p_get_pages(
|
||||
(*page_table)->page_size = page_size_index;
|
||||
|
||||
os_free_mem(physical_addresses);
|
||||
physical_addresses = NULL;
|
||||
|
||||
os_free_mem(wreqmb_h);
|
||||
wreqmb_h = NULL;
|
||||
|
||||
os_free_mem(rreqmb_h);
|
||||
rreqmb_h = NULL;
|
||||
|
||||
if (free_callback != NULL)
|
||||
{
|
||||
|
||||
@@ -4505,19 +4505,19 @@ NvU64 NV_API_CALL nv_get_dma_start_address(
|
||||
* as the starting address for all DMA mappings.
|
||||
*/
|
||||
saved_dma_mask = pci_dev->dma_mask;
|
||||
if (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(64)) != 0)
|
||||
if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(64)) != 0)
|
||||
{
|
||||
goto done;
|
||||
}
|
||||
|
||||
dma_addr = pci_map_single(pci_dev, NULL, 1, DMA_BIDIRECTIONAL);
|
||||
if (pci_dma_mapping_error(pci_dev, dma_addr))
|
||||
dma_addr = dma_map_single(&pci_dev->dev, NULL, 1, DMA_BIDIRECTIONAL);
|
||||
if (dma_mapping_error(&pci_dev->dev, dma_addr))
|
||||
{
|
||||
pci_set_dma_mask(pci_dev, saved_dma_mask);
|
||||
dma_set_mask(&pci_dev->dev, saved_dma_mask);
|
||||
goto done;
|
||||
}
|
||||
|
||||
pci_unmap_single(pci_dev, dma_addr, 1, DMA_BIDIRECTIONAL);
|
||||
dma_unmap_single(&pci_dev->dev, dma_addr, 1, DMA_BIDIRECTIONAL);
|
||||
|
||||
/*
|
||||
* From IBM: "For IODA2, native DMA bypass or KVM TCE-based implementation
|
||||
@@ -4549,7 +4549,7 @@ NvU64 NV_API_CALL nv_get_dma_start_address(
|
||||
*/
|
||||
nv_printf(NV_DBG_WARNINGS,
|
||||
"NVRM: DMA window limited by platform\n");
|
||||
pci_set_dma_mask(pci_dev, saved_dma_mask);
|
||||
dma_set_mask(&pci_dev->dev, saved_dma_mask);
|
||||
goto done;
|
||||
}
|
||||
else if ((dma_addr & saved_dma_mask) != 0)
|
||||
@@ -4568,7 +4568,7 @@ NvU64 NV_API_CALL nv_get_dma_start_address(
|
||||
*/
|
||||
nv_printf(NV_DBG_WARNINGS,
|
||||
"NVRM: DMA window limited by memory size\n");
|
||||
pci_set_dma_mask(pci_dev, saved_dma_mask);
|
||||
dma_set_mask(&pci_dev->dev, saved_dma_mask);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,11 @@ NvlStatus nvlink_lib_unload(void);
|
||||
*/
|
||||
NvlStatus nvlink_lib_ioctl_ctrl(nvlink_ioctrl_params *ctrl_params);
|
||||
|
||||
/*
|
||||
* Gets number of devices with type deviceType
|
||||
*/
|
||||
NvlStatus nvlink_lib_return_device_count_by_type(NvU32 deviceType, NvU32 *numDevices);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@ extern "C" {
|
||||
|
||||
#include "nvlink_common.h"
|
||||
|
||||
#define TOP_LEVEL_LOCKING_DISABLED 1
|
||||
#define PER_LINK_LOCKING_DISABLED 1
|
||||
|
||||
#define NVLINK_FREE(x) nvlink_free((void *)x)
|
||||
|
||||
// Memory management functions
|
||||
|
||||
Reference in New Issue
Block a user