gpu: nvgpu: gsp units separation

Separated gsp unit into three unit:
- GSP unit which holds the core functionality of GSP RISCV core,
  bootstrap, interrupt, etc.
- GSP Scheduler to hold the cmd/msg management, IPC, etc.
- GSP Test to hold stress test ucode specific support.

NVGPU-7492

Signed-off-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com>
Change-Id: I12340dc776d610502f28c8574843afc7481c0871
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2660619
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Ramesh Mylavarapu
2022-02-03 17:37:07 +05:30
committed by mobile promotions
parent 14ed75e857
commit 9302b2efee
29 changed files with 871 additions and 630 deletions

View File

@@ -44,6 +44,10 @@
#include <nvgpu/power_features/cg.h>
#ifdef CONFIG_NVGPU_GSP_SCHEDULER
#include <nvgpu/gsp.h>
#include <nvgpu/gsp_sched.h>
#endif
#ifdef CONFIG_NVGPU_GSP_STRESS_TEST
#include <nvgpu/gsp/gsp_test.h>
#endif
#include <nvgpu/pm_reservation.h>
#include <nvgpu/netlist.h>
@@ -346,6 +350,7 @@ int nvgpu_prepare_poweroff(struct gk20a *g)
ret = tmp_ret;
}
#ifndef CONFIG_NVGPU_DGPU
#ifdef CONFIG_NVGPU_GSP_STRESS_TEST
tmp_ret = nvgpu_gsp_stress_test_halt(g, true);
if (tmp_ret != 0) {
@@ -353,8 +358,9 @@ int nvgpu_prepare_poweroff(struct gk20a *g)
nvgpu_err(g, "Failed to halt GSP stress test");
}
#endif
#if defined(CONFIG_NVGPU_GSP_SCHEDULER)
nvgpu_gsp_suspend(g);
#ifdef CONFIG_NVGPU_GSP_SCHEDULER
nvgpu_gsp_sched_suspend(g, g->gsp_sched);
#endif
#endif
nvgpu_falcons_sw_free(g);
@@ -948,9 +954,14 @@ int nvgpu_finalize_poweron(struct gk20a *g)
#endif
NVGPU_INIT_TABLE_ENTRY(g->ops.channel.resume_all_serviceable_ch,
NO_FLAG),
#if defined(CONFIG_NVGPU_GSP_SCHEDULER) || defined(CONFIG_NVGPU_GSP_STRESS_TEST)
#ifndef CONFIG_NVGPU_DGPU
#ifdef CONFIG_NVGPU_GSP_SCHEDULER
/* Init gsp ops */
NVGPU_INIT_TABLE_ENTRY(&nvgpu_gsp_sw_init, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(&nvgpu_gsp_sched_sw_init, NO_FLAG),
#endif
#ifdef CONFIG_NVGPU_GSP_STRESS_TEST
NVGPU_INIT_TABLE_ENTRY(&nvgpu_gsp_stress_test_sw_init, NO_FLAG),
#endif
#endif
};
size_t i;