gpu: nvgpu: Add Epl Init

EPL lib constructor is replaced by NvEplInit() by safety services.
NvGPU, being an EPL user, needs to call NvEplInit before using EPL
API to report errors.
NvEplInit() usage is limited to user space in Linux, so NvGPU is not
expected to call NvEplInit on Linux.

Bug 3863536

Change-Id: I7fc9b33d3443bd39a6367a0c691bddb80b9edb68
Signed-off-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2817245
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Tejal Kudav
2022-11-27 18:49:27 +00:00
committed by mobile promotions
parent 7c7295f2c0
commit 31b2738f6a
4 changed files with 24 additions and 0 deletions

View File

@@ -208,6 +208,8 @@ endif
CONFIG_NVGPU_TSG_SHARING := y
CONFIG_NVGPU_EPL_INIT := n
ifeq ($(CONFIG_GK20A_PMU),y)
ccflags-y += -DCONFIG_GK20A_PMU
endif

View File

@@ -202,6 +202,15 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FALCON_DEBUG
#
ifneq ($(profile),safety_debug)
ifneq ($(NVGPU_HVRTOS),1)
ifeq ($(CONFIG_NVGPU_ENABLE_MISC_EC),1)
ifneq ($(CONFIG_NVGPU_MON_PRESENT),1)
CONFIG_NVGPU_EPL_INIT := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_EPL_INIT
endif
endif
endif
ifneq ($(NVGPU_HVRTOS),1)
CONFIG_NVGPU_SYSFS := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_SYSFS

View File

@@ -60,6 +60,14 @@ int nvgpu_cic_mon_init(struct gk20a *g)
return -EINVAL;
}
#ifdef CONFIG_NVGPU_EPL_INIT
err = nvgpu_cic_mon_init_epl(g);
if (err != 0) {
nvgpu_err(g, "NvEpl init failed: %d", err);
return -EINVAL;
}
#endif
#ifdef CONFIG_NVGPU_FSI_ERR_INJECTION
if (g->ops.cic_mon.reg_errinj_cb != NULL) {
err = g->ops.cic_mon.reg_errinj_cb(g);

View File

@@ -663,4 +663,9 @@ void nvgpu_cic_mon_intr_enable(struct gk20a *g);
int nvgpu_cic_mon_reg_errinj_cb(struct gk20a *g);
int nvgpu_cic_mon_dereg_errinj_cb(void);
#endif
#ifdef CONFIG_NVGPU_EPL_INIT
int nvgpu_cic_mon_init_epl(struct gk20a *g);
#endif
#endif /* NVGPU_CIC_MON_H */