diff --git a/README.md b/README.md index 7e502b8df..ec250084f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # NVIDIA Linux Open GPU Kernel Module Source This is the source release of the NVIDIA Linux open GPU kernel modules, -version 580.159.03. +version 580.159.04. ## How to Build @@ -17,7 +17,7 @@ as root: Note that the kernel modules built here must be used with GSP firmware and user-space NVIDIA GPU driver components from a corresponding -580.159.03 driver release. This can be achieved by installing +580.159.04 driver release. This can be achieved by installing the NVIDIA GPU driver from the .run file using the `--no-kernel-modules` option. E.g., @@ -185,7 +185,7 @@ table below). For details on feature support and limitations, see the NVIDIA GPU driver end user README here: -https://us.download.nvidia.com/XFree86/Linux-x86_64/580.159.03/README/kernel_open.html +https://us.download.nvidia.com/XFree86/Linux-x86_64/580.159.04/README/kernel_open.html For vGPU support, please refer to the README.vgpu packaged in the vGPU Host Package for more details. diff --git a/kernel-open/Kbuild b/kernel-open/Kbuild index 913ab383e..918dbb9cb 100644 --- a/kernel-open/Kbuild +++ b/kernel-open/Kbuild @@ -79,7 +79,7 @@ ccflags-y += -I$(src)/common/inc ccflags-y += -I$(src) ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -ccflags-y += -DNV_VERSION_STRING=\"580.159.03\" +ccflags-y += -DNV_VERSION_STRING=\"580.159.04\" # Include and link Tegra out-of-tree modules. ifneq ($(wildcard /usr/src/nvidia/nvidia-oot),) diff --git a/kernel-open/common/inc/nv-linux.h b/kernel-open/common/inc/nv-linux.h index 9c60ad6da..00336d89c 100644 --- a/kernel-open/common/inc/nv-linux.h +++ b/kernel-open/common/inc/nv-linux.h @@ -1771,7 +1771,69 @@ typedef enum #include #include #include +#if defined(NV_LINUX_OF_GPIO_H_PRESENT) #include +#else +#include + +/* + * of_get_named_gpio() was removed along with linux/of_gpio.h by commit + * 51aaf65bbd21 ("gpio: of: Remove "). Provide a compat + * implementation using the remaining public GPIO APIs. + */ +static inline int of_get_named_gpio(const struct device_node *np, + const char *propname, int index) +{ + struct of_phandle_args gpiospec; + struct gpio_device *gdev; + struct gpio_desc *desc; + int ret; + + if (!np) + return -ENOENT; + + ret = + of_parse_phandle_with_args_map(np, propname, "gpio", index, &gpiospec); + if (ret) + return ret; + + gdev = gpio_device_find_by_fwnode(of_fwnode_handle(gpiospec.np)); + of_node_put(gpiospec.np); + if (!gdev) + return -EPROBE_DEFER; + + /* + * Use the chip's of_xlate callback to translate the DT GPIO + * specifier into a linear offset. Tegra GPIO controllers encode + * port and pin in args[0] and of_xlate sums per-port pin counts + * to produce the real offset. + */ + { + struct gpio_chip *chip = gpio_device_get_chip(gdev); + int hwgpio; + +#if defined(CONFIG_OF_GPIO) + if (chip->of_xlate) + hwgpio = chip->of_xlate(chip, &gpiospec, NULL); + else +#endif + hwgpio = gpiospec.args[0]; + + if (hwgpio < 0) { + gpio_device_put(gdev); + return hwgpio; + } + + desc = gpio_device_get_desc(gdev, hwgpio); + } + gpio_device_put(gdev); + + if (IS_ERR(desc)) + return PTR_ERR(desc); + + return desc_to_gpio(desc); +} +#endif #include #include diff --git a/kernel-open/header-presence-tests.mk b/kernel-open/header-presence-tests.mk index 6242277ae..d23d94297 100644 --- a/kernel-open/header-presence-tests.mk +++ b/kernel-open/header-presence-tests.mk @@ -38,6 +38,7 @@ NV_HEADER_PRESENCE_TESTS = \ linux/vfio_pci_core.h \ linux/cc_platform.h \ linux/slub_def.h \ + linux/of_gpio.h \ asm/mshyperv.h \ crypto/sig.h diff --git a/src/common/inc/nvBldVer.h b/src/common/inc/nvBldVer.h index 656793b6f..c9899cf8b 100644 --- a/src/common/inc/nvBldVer.h +++ b/src/common/inc/nvBldVer.h @@ -43,11 +43,11 @@ #endif #if defined(NV_LINUX) || defined(NV_BSD) || defined(NV_SUNOS) -#define NV_BUILD_BRANCH_VERSION "rel/gpu_drv/r580/r582_49-529" -#define NV_BUILD_CHANGELIST_NUM (37855428) +#define NV_BUILD_BRANCH_VERSION "rel/gpu_drv/r580/r582_49-530" +#define NV_BUILD_CHANGELIST_NUM (37889135) #define NV_BUILD_TYPE "Official" -#define NV_BUILD_NAME "rel/gpu_drv/r580/r582_49-529" -#define NV_LAST_OFFICIAL_CHANGELIST_NUM (37855428) +#define NV_BUILD_NAME "rel/gpu_drv/r580/r582_49-530" +#define NV_LAST_OFFICIAL_CHANGELIST_NUM (37889135) #else /* Windows builds */ #define NV_BUILD_BRANCH_VERSION "r582_49-2" diff --git a/src/common/inc/nvUnixVersion.h b/src/common/inc/nvUnixVersion.h index 50b6b9fd9..e38dde2c5 100644 --- a/src/common/inc/nvUnixVersion.h +++ b/src/common/inc/nvUnixVersion.h @@ -4,7 +4,7 @@ #if defined(NV_LINUX) || defined(NV_BSD) || defined(NV_SUNOS) || defined(NV_VMWARE) || defined(NV_QNX) || defined(NV_INTEGRITY) || \ (defined(RMCFG_FEATURE_PLATFORM_GSP) && RMCFG_FEATURE_PLATFORM_GSP == 1) -#define NV_VERSION_STRING "580.159.03" +#define NV_VERSION_STRING "580.159.04" #else diff --git a/src/nvidia/generated/g_kernel_nvlink_nvoc.c b/src/nvidia/generated/g_kernel_nvlink_nvoc.c index 5f095ac80..eb806a554 100644 --- a/src/nvidia/generated/g_kernel_nvlink_nvoc.c +++ b/src/nvidia/generated/g_kernel_nvlink_nvoc.c @@ -242,18 +242,6 @@ void __nvoc_init_dataField_KernelNvlink(KernelNvlink *pThis, RmHalspecOwner *pRm pThis->setProperty(pThis, PDB_PROP_KNVLINK_ENABLED, NV_FALSE); } - // NVOC Property Hal field -- PDB_PROP_KNVLINK_RESET_HSHUBNVL_ON_TEARDOWN - if (( ((chipHal_HalVarIdx >> 5) == 1UL) && ((1UL << (chipHal_HalVarIdx & 0x1f)) & 0xe0000000UL) ) || - ( ((chipHal_HalVarIdx >> 5) == 2UL) && ((1UL << (chipHal_HalVarIdx & 0x1f)) & 0x00000fe6UL) )) /* ChipHal: GB100 | GB102 | GB10B | GB110 | GB112 | GB202 | GB203 | GB205 | GB206 | GB207 | GB20B | GB20C */ - { - pThis->setProperty(pThis, PDB_PROP_KNVLINK_RESET_HSHUBNVL_ON_TEARDOWN, NV_TRUE); - } - // default - else - { - pThis->setProperty(pThis, PDB_PROP_KNVLINK_RESET_HSHUBNVL_ON_TEARDOWN, NV_FALSE); - } - // NVOC Property Hal field -- PDB_PROP_KNVLINK_UNSET_NVLINK_PEER_SUPPORTED if (( ((chipHal_HalVarIdx >> 5) == 1UL) && ((1UL << (chipHal_HalVarIdx & 0x1f)) & 0xf1f0fc00UL) ) || ( ((chipHal_HalVarIdx >> 5) == 2UL) && ((1UL << (chipHal_HalVarIdx & 0x1f)) & 0x00000fe6UL) )) /* ChipHal: GA100 | GA102 | GA103 | GA104 | GA106 | GA107 | AD102 | AD103 | AD104 | AD106 | AD107 | GH100 | GB100 | GB102 | GB10B | GB110 | GB112 | GB202 | GB203 | GB205 | GB206 | GB207 | GB20B | GB20C */ diff --git a/src/nvidia/generated/g_kernel_nvlink_nvoc.h b/src/nvidia/generated/g_kernel_nvlink_nvoc.h index 2f129bfcf..f06f36eae 100644 --- a/src/nvidia/generated/g_kernel_nvlink_nvoc.h +++ b/src/nvidia/generated/g_kernel_nvlink_nvoc.h @@ -304,11 +304,10 @@ struct KernelNvlink { NV_STATUS (*__knvlinkEncryptionGetGpuIdentifiers__)(struct OBJGPU *, struct KernelNvlink * /*this*/); // halified (2 hals) body NV_STATUS (*__knvlinkEncryptionUpdateTopology__)(struct OBJGPU *, struct KernelNvlink * /*this*/, NvU32, NvU32); // halified (2 hals) body - // 21 PDB properties + // 20 PDB properties // NvBool PDB_PROP_KNVLINK_IS_MISSING inherited from OBJENGSTATE NvBool PDB_PROP_KNVLINK_ENABLED; NvBool PDB_PROP_KNVLINK_L2_POWER_STATE_ENABLED; - NvBool PDB_PROP_KNVLINK_RESET_HSHUBNVL_ON_TEARDOWN; NvBool PDB_PROP_KNVLINK_UNSET_NVLINK_PEER_SUPPORTED; NvBool PDB_PROP_KNVLINK_CONFIG_REQUIRE_INITIALIZED_LINKS_CHECK; NvBool PDB_PROP_KNVLINK_LANE_SHUTDOWN_ENABLED; @@ -463,11 +462,10 @@ struct KernelNvlink_PRIVATE { NV_STATUS (*__knvlinkEncryptionGetGpuIdentifiers__)(struct OBJGPU *, struct KernelNvlink * /*this*/); // halified (2 hals) body NV_STATUS (*__knvlinkEncryptionUpdateTopology__)(struct OBJGPU *, struct KernelNvlink * /*this*/, NvU32, NvU32); // halified (2 hals) body - // 21 PDB properties + // 20 PDB properties // NvBool PDB_PROP_KNVLINK_IS_MISSING inherited from OBJENGSTATE NvBool PDB_PROP_KNVLINK_ENABLED; NvBool PDB_PROP_KNVLINK_L2_POWER_STATE_ENABLED; - NvBool PDB_PROP_KNVLINK_RESET_HSHUBNVL_ON_TEARDOWN; NvBool PDB_PROP_KNVLINK_UNSET_NVLINK_PEER_SUPPORTED; NvBool PDB_PROP_KNVLINK_CONFIG_REQUIRE_INITIALIZED_LINKS_CHECK; NvBool PDB_PROP_KNVLINK_LANE_SHUTDOWN_ENABLED; @@ -609,8 +607,6 @@ extern const struct NVOC_CLASS_DEF __nvoc_class_def_KernelNvlink; #define PDB_PROP_KNVLINK_ENABLED_BASE_NAME PDB_PROP_KNVLINK_ENABLED #define PDB_PROP_KNVLINK_L2_POWER_STATE_ENABLED_BASE_CAST #define PDB_PROP_KNVLINK_L2_POWER_STATE_ENABLED_BASE_NAME PDB_PROP_KNVLINK_L2_POWER_STATE_ENABLED -#define PDB_PROP_KNVLINK_RESET_HSHUBNVL_ON_TEARDOWN_BASE_CAST -#define PDB_PROP_KNVLINK_RESET_HSHUBNVL_ON_TEARDOWN_BASE_NAME PDB_PROP_KNVLINK_RESET_HSHUBNVL_ON_TEARDOWN #define PDB_PROP_KNVLINK_UNSET_NVLINK_PEER_SUPPORTED_BASE_CAST #define PDB_PROP_KNVLINK_UNSET_NVLINK_PEER_SUPPORTED_BASE_NAME PDB_PROP_KNVLINK_UNSET_NVLINK_PEER_SUPPORTED #define PDB_PROP_KNVLINK_CONFIG_REQUIRE_INITIALIZED_LINKS_CHECK_BASE_CAST diff --git a/src/nvidia/src/kernel/gpu/bus/arch/pascal/kern_bus_gp100.c b/src/nvidia/src/kernel/gpu/bus/arch/pascal/kern_bus_gp100.c index 46e22b0b8..8f9f8306f 100644 --- a/src/nvidia/src/kernel/gpu/bus/arch/pascal/kern_bus_gp100.c +++ b/src/nvidia/src/kernel/gpu/bus/arch/pascal/kern_bus_gp100.c @@ -488,9 +488,20 @@ _kbusRemoveNvlinkPeerMapping // reach 0 until both the peer ids are removed. In this case, // busNvlinkMappingRefcountPerPeerId[peerId] == 0 check is required to // remove the peer id from busNvlinkPeerNumberMask[peerGpuInst]. + // Similarly, when busNvlinkMappingRefcountPerGpu[peerGpuInst] does reach 0, + // we must remove both/all peers from busNvlinkPeerNumberMask[peerGpuInst]. + // See bug 6088482 for more details of this sequence. // - if (pKernelBus0->p2p.busNvlinkMappingRefcountPerGpu[peerGpuInst] == 0 || - pKernelBus0->p2p.busNvlinkMappingRefcountPerPeerId[peerId] == 0) + + if (pKernelBus0->p2p.busNvlinkMappingRefcountPerGpu[peerGpuInst] == 0) + { + NV_PRINTF(LEVEL_INFO, + "Removing all remaining peer mappings for GPU%u to GPU%u (0x%x)\n", + gpuGetInstance(pGpu0), peerGpuInst, pKernelBus0->p2p.busNvlinkPeerNumberMask[peerGpuInst]); + + pKernelBus0->p2p.busNvlinkPeerNumberMask[peerGpuInst] = 0; + } + else if (pKernelBus0->p2p.busNvlinkMappingRefcountPerPeerId[peerId] == 0) { NV_PRINTF(LEVEL_INFO, "Removing mapping for GPU%u peer %u (GPU%u)\n", diff --git a/version.mk b/version.mk index 40a7e9406..c27ee246c 100644 --- a/version.mk +++ b/version.mk @@ -1,5 +1,5 @@ -NVIDIA_VERSION = 580.159.03 -NVIDIA_NVID_VERSION = 580.159.03 +NVIDIA_VERSION = 580.159.04 +NVIDIA_NVID_VERSION = 580.159.04 NVIDIA_NVID_EXTRA = # This file.