gpu: nvgpu: enable Orin support in safety build

Most of the Orin chip specific code is compiled out of safety build
with CONFIG_NVGPU_NON_FUSA and CONFIG_NVGPU_HAL_NON_FUSA. Remove the
config protection from Orin/GA10B specific code. Currently all code
is enabled. Code not required in safety will be compiled out later
in separate activity.

Other noteworthy changes in this patch related to safety build:

- In ga10b_ce_request_idle(), add a log print to dump num_pce so that
  compiler does not complain about unused variable num_pce.
- In ga10b_fifo_ctxsw_timeout_isr(), protect variables active_eng_id and
  recover under CONFIG_NVGPU_KERNEL_MODE_SUBMIT to fix compilation
  errors of unused variables.
- Compile out HAL gops.pbdma.force_ce_split() from safety since this HAL
  is GA100 specific and not required for GA10B.
- Compile out gr_ga100_process_context_buffer_priv_segment() with
  CONFIG_NVGPU_DEBUGGER.
- Compile out VAB support with CONFIG_NVGPU_HAL_NON_FUSA.
- In ga10b_gr_intr_handle_sw_method(), protect left_shift_by_2 variable
  with appropriate configs to fix unused variable compilation error.
- In ga10b_intr_isr_stall_host2soc_3(), compile ELPG function calls
  with CONFIG_NVGPU_POWER_PG.
- In ga10b_pmu_handle_swgen1_irq(), move whole function body under
  CONFIG_NVGPU_FALCON_DEBUG to fix unused variable compilation errors.
- Add below TU104 specific files in safety build since some of the code
  in those files is required for GA10B. Unnecessary code will be
  compiled out later on.
	hal/gr/init/gr_init_tu104.c
	hal/class/class_tu104.c
	hal/mc/mc_tu104.c
	hal/fifo/usermode_tu104.c
	hal/gr/falcon/gr_falcon_tu104.c
- Compile out GA10B specific debugger/profiler related files from
  safety build.
- Disable CONFIG_NVGPU_FALCON_DEBUG from safety debug build temporarily
  to work around compilation errors seen with keeping this config
  enabled. Config will be re-enabled in safety debug build later.

Jira NVGPU-7276

Change-Id: I35f2489830ac083d52504ca411c3f1d96e72fc48
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2627048
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Deepak Nibade
2021-11-15 17:58:21 +05:30
committed by mobile promotions
parent 71cd434f4f
commit 3d9c67a0e7
64 changed files with 198 additions and 309 deletions

View File

@@ -584,7 +584,9 @@ static const struct gops_gr_hwpm_map ga100_ops_gr_hwpm_map = {
static const struct gops_gr_init ga100_ops_gr_init = {
.get_no_of_sm = nvgpu_gr_get_no_of_sm,
.get_nonpes_aware_tpc = gv11b_gr_init_get_nonpes_aware_tpc,
#ifdef CONFIG_NVGPU_HAL_NON_FUSA
.wait_initialized = nvgpu_gr_wait_initialized,
#endif
.ecc_scrub_reg = NULL,
.lg_coalesce = NULL,
.su_coalesce = NULL,
@@ -1045,7 +1047,9 @@ static const struct gops_pbdma ga100_ops_pbdma = {
.set_channel_info_veid = gv11b_pbdma_set_channel_info_veid,
.set_channel_info_chid = ga10b_pbdma_set_channel_info_chid,
.set_intr_notify = ga10b_pbdma_set_intr_notify,
#ifdef CONFIG_NVGPU_HAL_NON_FUSA
.pbdma_force_ce_split = ga100_pbdma_force_ce_split,
#endif
.config_userd_writeback_enable = gv11b_pbdma_config_userd_writeback_enable,
.get_mmu_fault_id = ga10b_pbdma_get_mmu_fault_id,
.get_num_of_pbdmas = ga100_pbdma_get_num_of_pbdmas,
@@ -1426,7 +1430,9 @@ static const struct gops_mc ga100_ops_mc = {
.fb_reset = NULL,
.ltc_isr = mc_tu104_ltc_isr,
.is_mmu_fault_pending = ga10b_intr_is_mmu_fault_pending,
#ifdef CONFIG_NVGPU_HAL_NON_FUSA
.intr_get_unit_info = ga10b_mc_intr_get_unit_info,
#endif
};
#endif
@@ -1705,7 +1711,9 @@ static const struct gops_grmgr ga100_ops_grmgr = {
#else
.init_gr_manager = nvgpu_init_gr_manager,
#endif
#ifdef CONFIG_NVGPU_NON_FUSA
.load_timestamp_prod = ga10b_grmgr_load_smc_arb_timestamp_prod,
#endif
.discover_gpc_ids = ga10b_grmgr_discover_gpc_ids,
};
#endif