mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: Remove dependency on DGPU CONFIG
The error injection code was enabled only when CONFIG_NVGPU_DGPU = n so that the dGPUs do not attempt any error injection callback function registration. But, this introduced dependency on DGPU config when needs to be explicitly set to n for error injection to be enabled. Remove the dependency by moving the error injection callback registration and deregistration to a HAL which is enabled only on GA10b. Bug 3819160 Change-Id: I4f4eb99189b1af3502d719536a91cc5e5d866bce Signed-off-by: Tejal Kudav <tkudav@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2787202 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
30e7a5e5ed
commit
724f49f6eb
@@ -46,16 +46,18 @@ int nvgpu_cic_mon_setup(struct gk20a *g)
|
||||
g->cic_mon = cic_mon;
|
||||
|
||||
#ifdef CONFIG_NVGPU_FSI_ERR_INJECTION
|
||||
err = nvgpu_cic_mon_reg_errinj_cb(g);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g,
|
||||
"Err inj callback registration failed: %d",
|
||||
err);
|
||||
/* Continue CIC init despite err inj utility
|
||||
* registration failure, as the err inj support
|
||||
* is meant only for debug purposes.
|
||||
*/
|
||||
err = 0;
|
||||
if (g->ops.cic_mon.reg_errinj_cb != NULL) {
|
||||
err = g->ops.cic_mon.reg_errinj_cb(g);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g,
|
||||
"Err inj callback registration failed: %d",
|
||||
err);
|
||||
/* Continue CIC init despite err inj utility
|
||||
* registration failure, as the err inj support
|
||||
* is meant only for debug purposes.
|
||||
*/
|
||||
err = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -100,16 +102,17 @@ int nvgpu_cic_mon_remove(struct gk20a *g)
|
||||
struct nvgpu_cic_mon *cic_mon;
|
||||
|
||||
#ifdef CONFIG_NVGPU_FSI_ERR_INJECTION
|
||||
int err = nvgpu_cic_mon_dereg_errinj_cb();
|
||||
|
||||
if (err != 0) {
|
||||
nvgpu_err(g,
|
||||
"Err inj callback de-registration failed: %d",
|
||||
err);
|
||||
/* Continue CIC remove despite err inj utility
|
||||
* de-registration failure, as the err inj support
|
||||
* is meant only for debug purposes.
|
||||
*/
|
||||
if (g->ops.cic_mon.dereg_errinj_cb != NULL) {
|
||||
int err = g->ops.cic_mon.dereg_errinj_cb();
|
||||
if (err != 0) {
|
||||
nvgpu_err(g,
|
||||
"Err inj callback de-registration failed: %d",
|
||||
err);
|
||||
/* Continue CIC remove despite err inj utility
|
||||
* de-registration failure, as the err inj support
|
||||
* is meant only for debug purposes.
|
||||
*/
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user