mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: remove tegra config dependencies
Remove direct dependency on CONFIG_TEGRA_NVLINK and CONFIG_TEGRA_GR_VIRTUALIZATION and substituting them with CONFIG_NVGPU_NVLINK and CONFIG_NVGPU_GR_VIRTUALIZATION respectively. Bug 200551105 Change-Id: I90dfb3c558483aa5d42aa607ed2db7f07d80b3e8 Signed-off-by: ddutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2267455 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -194,3 +194,17 @@ config NVGPU_RECOVERY
|
|||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
Support recovery on failure (which may involve engine reset)
|
Support recovery on failure (which may involve engine reset)
|
||||||
|
|
||||||
|
config NVGPU_NVLINK
|
||||||
|
bool "Nvlink support"
|
||||||
|
depends on TEGRA_NVLINK
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Support Nvlink
|
||||||
|
|
||||||
|
config NVGPU_GR_VIRTUALIZATION
|
||||||
|
bool "NVGPU Virtualization Support"
|
||||||
|
depends on TEGRA_GR_VIRTUALIZATION
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Support NVGPU Virtualization
|
||||||
@@ -22,10 +22,6 @@ ccflags-y += -DCONFIG_NVGPU_DEBUGGER
|
|||||||
ccflags-y += -DCONFIG_NVGPU_ENGINE_RESET
|
ccflags-y += -DCONFIG_NVGPU_ENGINE_RESET
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_NVLINK),y)
|
|
||||||
ccflags-y += -DCONFIG_NVGPU_NVLINK
|
|
||||||
endif
|
|
||||||
|
|
||||||
ccflags-y += -DCONFIG_NVGPU_TPC_POWERGATE
|
ccflags-y += -DCONFIG_NVGPU_TPC_POWERGATE
|
||||||
ccflags-y += -DCONFIG_NVGPU_ACR_LEGACY
|
ccflags-y += -DCONFIG_NVGPU_ACR_LEGACY
|
||||||
ccflags-y += -DCONFIG_NVGPU_ENGINE_QUEUE
|
ccflags-y += -DCONFIG_NVGPU_ENGINE_QUEUE
|
||||||
@@ -424,7 +420,7 @@ nvgpu-$(CONFIG_TEGRA_GK20A_NVHOST) += \
|
|||||||
hal/sync/syncpt_cmdbuf_gk20a.o \
|
hal/sync/syncpt_cmdbuf_gk20a.o \
|
||||||
hal/sync/syncpt_cmdbuf_gv11b.o
|
hal/sync/syncpt_cmdbuf_gv11b.o
|
||||||
|
|
||||||
nvgpu-$(CONFIG_TEGRA_GR_VIRTUALIZATION) += \
|
nvgpu-$(CONFIG_NVGPU_GR_VIRTUALIZATION) += \
|
||||||
os/linux/vgpu/platform_vgpu_tegra.o \
|
os/linux/vgpu/platform_vgpu_tegra.o \
|
||||||
os/linux/vgpu/sysfs_vgpu.o \
|
os/linux/vgpu/sysfs_vgpu.o \
|
||||||
os/linux/vgpu/vgpu_ivc.o \
|
os/linux/vgpu/vgpu_ivc.o \
|
||||||
@@ -433,7 +429,7 @@ nvgpu-$(CONFIG_TEGRA_GR_VIRTUALIZATION) += \
|
|||||||
os/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.o
|
os/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.o
|
||||||
|
|
||||||
ifeq ($(CONFIG_NVGPU_FECS_TRACE),y)
|
ifeq ($(CONFIG_NVGPU_FECS_TRACE),y)
|
||||||
nvgpu-$(CONFIG_TEGRA_GR_VIRTUALIZATION) += \
|
nvgpu-$(CONFIG_NVGPU_GR_VIRTUALIZATION) += \
|
||||||
os/linux/vgpu/fecs_trace_vgpu_linux.o
|
os/linux/vgpu/fecs_trace_vgpu_linux.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -516,7 +512,7 @@ nvgpu-y += \
|
|||||||
common/ce/ce_app.o \
|
common/ce/ce_app.o \
|
||||||
common/debugger.o
|
common/debugger.o
|
||||||
|
|
||||||
nvgpu-$(CONFIG_TEGRA_GR_VIRTUALIZATION) += \
|
nvgpu-$(CONFIG_NVGPU_GR_VIRTUALIZATION) += \
|
||||||
common/vgpu/ltc/ltc_vgpu.o \
|
common/vgpu/ltc/ltc_vgpu.o \
|
||||||
common/vgpu/fbp/fbp_vgpu.o \
|
common/vgpu/fbp/fbp_vgpu.o \
|
||||||
common/vgpu/fb/fb_vgpu.o \
|
common/vgpu/fb/fb_vgpu.o \
|
||||||
@@ -551,7 +547,7 @@ nvgpu-$(CONFIG_NVGPU_CYCLESTATS) += \
|
|||||||
common/perf/cyclestats_snapshot.o \
|
common/perf/cyclestats_snapshot.o \
|
||||||
common/cyclestats/cyclestats.o
|
common/cyclestats/cyclestats.o
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_GR_VIRTUALIZATION),y)
|
ifeq ($(CONFIG_NVGPU_GR_VIRTUALIZATION),y)
|
||||||
nvgpu-$(CONFIG_NVGPU_CYCLESTATS) += \
|
nvgpu-$(CONFIG_NVGPU_CYCLESTATS) += \
|
||||||
common/vgpu/perf/cyclestats_snapshot_vgpu.o
|
common/vgpu/perf/cyclestats_snapshot_vgpu.o
|
||||||
nvgpu-$(CONFIG_NVGPU_COMPRESSION) += \
|
nvgpu-$(CONFIG_NVGPU_COMPRESSION) += \
|
||||||
@@ -705,7 +701,7 @@ nvgpu-$(CONFIG_NVGPU_HAL_NON_FUSA) += \
|
|||||||
hal/therm/therm_gm20b.o \
|
hal/therm/therm_gm20b.o \
|
||||||
hal/top/top_gm20b.o
|
hal/top/top_gm20b.o
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_GR_VIRTUALIZATION),y)
|
ifeq ($(CONFIG_NVGPU_GR_VIRTUALIZATION),y)
|
||||||
nvgpu-$(CONFIG_NVGPU_HAL_NON_FUSA) += \
|
nvgpu-$(CONFIG_NVGPU_HAL_NON_FUSA) += \
|
||||||
hal/vgpu/init/vgpu_hal_gp10b.o \
|
hal/vgpu/init/vgpu_hal_gp10b.o \
|
||||||
hal/vgpu/init/vgpu_hal_gv11b.o
|
hal/vgpu/init/vgpu_hal_gv11b.o
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ NVGPU_COMMON_CFLAGS += \
|
|||||||
-DCONFIG_NVGPU_SUPPORT_TURING \
|
-DCONFIG_NVGPU_SUPPORT_TURING \
|
||||||
-DCONFIG_TEGRA_GK20A_PMU=1 \
|
-DCONFIG_TEGRA_GK20A_PMU=1 \
|
||||||
-DCONFIG_TEGRA_ACR=1 \
|
-DCONFIG_TEGRA_ACR=1 \
|
||||||
-DCONFIG_TEGRA_GR_VIRTUALIZATION \
|
-DCONFIG_NVGPU_GR_VIRTUALIZATION \
|
||||||
-DCONFIG_PCI_MSI
|
-DCONFIG_PCI_MSI
|
||||||
|
|
||||||
CONFIG_NVGPU_LOGGING := 1
|
CONFIG_NVGPU_LOGGING := 1
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ struct nvgpu_gr_ctx {
|
|||||||
bool boosted_ctx;
|
bool boosted_ctx;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
u64 virt_ctx;
|
u64 virt_ctx;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -682,7 +682,7 @@ static int nvgpu_vm_init_attributes(struct mm_gk20a *mm,
|
|||||||
vm->mmu_levels =
|
vm->mmu_levels =
|
||||||
g->ops.mm.gmmu.get_mmu_levels(g, vm->big_page_size);
|
g->ops.mm.gmmu.get_mmu_levels(g, vm->big_page_size);
|
||||||
|
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
if (g->is_virtual && userspace_managed) {
|
if (g->is_virtual && userspace_managed) {
|
||||||
nvgpu_err(g, "vGPU: no userspace managed addr space support");
|
nvgpu_err(g, "vGPU: no userspace managed addr space support");
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|||||||
@@ -2049,7 +2049,7 @@ PREDEFINED += CONFIG_TEGRA_T19X_GRHOST
|
|||||||
PREDEFINED += CONFIG_NVGPU_SUPPORT_TURING
|
PREDEFINED += CONFIG_NVGPU_SUPPORT_TURING
|
||||||
PREDEFINED += CONFIG_TEGRA_GK20A_PMU
|
PREDEFINED += CONFIG_TEGRA_GK20A_PMU
|
||||||
PREDEFINED += CONFIG_TEGRA_ACR
|
PREDEFINED += CONFIG_TEGRA_ACR
|
||||||
PREDEFINED += CONFIG_TEGRA_GR_VIRTUALIZATION
|
PREDEFINED += CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
PREDEFINED += CONFIG_PCI_MSI
|
PREDEFINED += CONFIG_PCI_MSI
|
||||||
PREDEFINED += CONFIG_NVGPU_LOGGING
|
PREDEFINED += CONFIG_NVGPU_LOGGING
|
||||||
PREDEFINED += CONFIG_NVGPU_GR_GOLDEN_CTX_VERIFICATION
|
PREDEFINED += CONFIG_NVGPU_GR_GOLDEN_CTX_VERIFICATION
|
||||||
|
|||||||
@@ -489,7 +489,7 @@ struct nvgpu_channel {
|
|||||||
/** Syncpoint for usermode submit case. */
|
/** Syncpoint for usermode submit case. */
|
||||||
struct nvgpu_channel_sync *user_sync;
|
struct nvgpu_channel_sync *user_sync;
|
||||||
|
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
/** Channel handle for vgpu case. */
|
/** Channel handle for vgpu case. */
|
||||||
u64 virt_ctx;
|
u64 virt_ctx;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#ifndef NVGPU_VGPU_VM_H
|
#ifndef NVGPU_VGPU_VM_H
|
||||||
#define NVGPU_VGPU_VM_H
|
#define NVGPU_VGPU_VM_H
|
||||||
|
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
int vgpu_vm_as_alloc_share(struct gk20a *g, struct vm_gk20a *vm);
|
int vgpu_vm_as_alloc_share(struct gk20a *g, struct vm_gk20a *vm);
|
||||||
void vgpu_vm_as_free_share(struct vm_gk20a *vm);
|
void vgpu_vm_as_free_share(struct vm_gk20a *vm);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ struct vm_gk20a {
|
|||||||
*/
|
*/
|
||||||
struct nvgpu_list_node vm_area_list;
|
struct nvgpu_list_node vm_area_list;
|
||||||
|
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
u64 handle;
|
u64 handle;
|
||||||
#endif
|
#endif
|
||||||
/** Supported page sizes. */
|
/** Supported page sizes. */
|
||||||
|
|||||||
@@ -699,11 +699,11 @@ static struct of_device_id tegra_gk20a_of_match[] = {
|
|||||||
.data = &gp10b_tegra_platform },
|
.data = &gp10b_tegra_platform },
|
||||||
{ .compatible = "nvidia,gv11b",
|
{ .compatible = "nvidia,gv11b",
|
||||||
.data = &gv11b_tegra_platform },
|
.data = &gv11b_tegra_platform },
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
{ .compatible = "nvidia,gv11b-vgpu",
|
{ .compatible = "nvidia,gv11b-vgpu",
|
||||||
.data = &gv11b_vgpu_tegra_platform},
|
.data = &gv11b_vgpu_tegra_platform},
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
{ .compatible = "nvidia,tegra124-gk20a-vgpu",
|
{ .compatible = "nvidia,tegra124-gk20a-vgpu",
|
||||||
.data = &vgpu_tegra_platform },
|
.data = &vgpu_tegra_platform },
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ struct gk20a_platform {
|
|||||||
struct dvfs_rail *gpu_rail;
|
struct dvfs_rail *gpu_rail;
|
||||||
|
|
||||||
bool virtual_dev;
|
bool virtual_dev;
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
void *vgpu_priv;
|
void *vgpu_priv;
|
||||||
#endif
|
#endif
|
||||||
/* source frequency for ptimer in hz */
|
/* source frequency for ptimer in hz */
|
||||||
@@ -322,7 +322,7 @@ static inline struct gk20a_platform *gk20a_get_platform(
|
|||||||
extern struct gk20a_platform gm20b_tegra_platform;
|
extern struct gk20a_platform gm20b_tegra_platform;
|
||||||
extern struct gk20a_platform gp10b_tegra_platform;
|
extern struct gk20a_platform gp10b_tegra_platform;
|
||||||
extern struct gk20a_platform gv11b_tegra_platform;
|
extern struct gk20a_platform gv11b_tegra_platform;
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
extern struct gk20a_platform vgpu_tegra_platform;
|
extern struct gk20a_platform vgpu_tegra_platform;
|
||||||
extern struct gk20a_platform gv11b_vgpu_tegra_platform;
|
extern struct gk20a_platform gv11b_vgpu_tegra_platform;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
struct device;
|
struct device;
|
||||||
struct platform_device;
|
struct platform_device;
|
||||||
|
|
||||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||||
|
|
||||||
#include <nvgpu/vgpu/vgpu.h>
|
#include <nvgpu/vgpu/vgpu.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user