gpu: nvgpu: split ecc support per GPU HW unit

To enable ecc interrupts early during nvgpu_finalize_poweron, ecc
support has to be enabled early. ecc support was being initialized
together for GR, LTC, PMU, FB units late in the poweron sequence.

Move the ecc init for each unit to respective unit's init functions.
And separate out the hal ecc functions from GR ecc unit to
respective hal units.

JIRA NVGPU-4336

Change-Id: I2c42fb6ba3192dece00be61411c64a56ce16740a
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2239153
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sagar Kamble
2019-11-12 21:53:05 +05:30
committed by Alex Waterman
parent 89518f3740
commit daf5475f50
44 changed files with 1033 additions and 706 deletions

View File

@@ -502,6 +502,13 @@ int nvgpu_finalize_poweron(struct gk20a *g)
* Do this early so any early VMs that get made are capable of
* mapping buffers.
*/
/**
* ECC support initialization is split into generic init
* followed by per unit initialization and ends with sysfs
* support init. This is done to setup ECC data structures
* prior to enabling interrupts for corresponding units.
*/
NVGPU_INIT_TABLE_ENTRY(g->ops.ecc.ecc_init_support, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(g->ops.mm.pd_cache_init, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(&nvgpu_falcons_sw_init, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(g->ops.pmu.pmu_early_init, NO_FLAG),
@@ -561,7 +568,12 @@ int nvgpu_finalize_poweron(struct gk20a *g)
#endif
NVGPU_INIT_TABLE_ENTRY(g->ops.fbp.fbp_init_support, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(g->ops.gr.gr_init_support, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(g->ops.gr.ecc.ecc_init_support, NO_FLAG),
/**
* All units requiring ECC stats must initialize ECC counters
* before this call to finalize ECC support.
*/
NVGPU_INIT_TABLE_ENTRY(g->ops.ecc.ecc_finalize_support,
NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(&nvgpu_init_release_tpc_pg_lock,
NO_FLAG),
#ifdef CONFIG_NVGPU_LS_PMU
@@ -732,8 +744,8 @@ static void gk20a_free_cb(struct nvgpu_ref *refcount)
}
#endif
if (g->ops.gr.ecc.ecc_remove_support != NULL) {
g->ops.gr.ecc.ecc_remove_support(g);
if (g->ops.ecc.ecc_remove_support != NULL) {
g->ops.ecc.ecc_remove_support(g);
}
if (g->remove_support != NULL) {