diff options
Diffstat (limited to 'kernel/gsp_phys_booter.c')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 79 |
1 files changed, 52 insertions, 27 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index b8de6c3..241fe04 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -13168,6 +13168,7 @@ static int gsp_phys_rmcall_user_lane_lane_enable(void __iomem *bar0) struct gsp_phys_rmcall_preemption_params pp; struct gsp_phys_rmcall_timeslice_params ts; struct gsp_phys_rmcall_device_sched_params ds; + u32 skip = (u32)gsp_phys_rmcall_gr_lane_skip_value(); u32 rpc_result = 0, status = 0; int ret; @@ -13176,39 +13177,63 @@ static int gsp_phys_rmcall_user_lane_lane_enable(void __iomem *bar0) pp.h_channel_group = cpu_to_le32(boot_stage.rmcall_tsg); pp.cilp_ctxsw_preempt_mode = cpu_to_le32(GSP_PHYS_RMCALL_PREEMPT_MODE_CILP); - ret = gsp_phys_rmcall_control(bar0, boot_stage.rmcall_subdevice, - GSP_PHYS_RMCALL_CTRL_GR_SET_CTXSW_PREEMPTION_MODE, - &pp, sizeof(pp), 16, NULL, 0, &rpc_result, &status, - "GR_SET_CTXSW_PREEMPTION_MODE (mode 35 lane enable, R2 #1059)"); - pr_info("vgsp-boot: rm-call: mode 35 lane enable #1059 GR_SET_CTXSW_PREEMPTION_MODE: flags=0x%x hChannelGroup=0x%x cilp=%u status=0x%x rpc_result=0x%x ret=%d\n", - le32_to_cpu(pp.flags), le32_to_cpu(pp.h_channel_group), - le32_to_cpu(pp.cilp_ctxsw_preempt_mode), status, rpc_result, ret); - if (ret) - return ret; + if (skip & 1u) { + pr_info("vgsp-boot: rm-call: mode 35 lane enable #1059 GR_SET_CTXSW_PREEMPTION_MODE SKIPPED by gsp_phys_rmcall_gr_lane_skip=0x%x\n", + skip); + } else { + ret = gsp_phys_rmcall_control(bar0, boot_stage.rmcall_subdevice, + GSP_PHYS_RMCALL_CTRL_GR_SET_CTXSW_PREEMPTION_MODE, + &pp, sizeof(pp), 16, NULL, 0, &rpc_result, + &status, + "GR_SET_CTXSW_PREEMPTION_MODE (mode 35 lane enable, R2 #1059)"); + pr_info("vgsp-boot: rm-call: mode 35 lane enable #1059 GR_SET_CTXSW_PREEMPTION_MODE: flags=0x%x hChannelGroup=0x%x cilp=%u status=0x%x rpc_result=0x%x ret=%d\n", + le32_to_cpu(pp.flags), + le32_to_cpu(pp.h_channel_group), + le32_to_cpu(pp.cilp_ctxsw_preempt_mode), status, + rpc_result, ret); + if (ret) + return ret; + } memset(&ts, 0, sizeof(ts)); ts.timeslice = cpu_to_le32(GSP_PHYS_RMCALL_LANE_TIMESLICE); - ret = gsp_phys_rmcall_control(bar0, boot_stage.rmcall_tsg, - GSP_PHYS_RMCALL_CTRL_SET_TIMESLICE, - &ts, sizeof(ts), 16, NULL, 0, &rpc_result, &status, - "SET_TIMESLICE (mode 35 lane enable, R2 #1061)"); - pr_info("vgsp-boot: rm-call: mode 35 lane enable #1061 SET_TIMESLICE: timeslice=0x%x hTsg=0x%x status=0x%x rpc_result=0x%x ret=%d\n", - le32_to_cpu(ts.timeslice), boot_stage.rmcall_tsg, - status, rpc_result, ret); - if (ret) - return ret; + if (skip & 2u) { + pr_info("vgsp-boot: rm-call: mode 35 lane enable #1061 SET_TIMESLICE SKIPPED by gsp_phys_rmcall_gr_lane_skip=0x%x\n", + skip); + } else { + ret = gsp_phys_rmcall_control(bar0, boot_stage.rmcall_tsg, + GSP_PHYS_RMCALL_CTRL_SET_TIMESLICE, + &ts, sizeof(ts), 16, NULL, 0, &rpc_result, + &status, + "SET_TIMESLICE (mode 35 lane enable, R2 #1061)"); + pr_info("vgsp-boot: rm-call: mode 35 lane enable #1061 SET_TIMESLICE: timeslice=0x%x hTsg=0x%x status=0x%x rpc_result=0x%x ret=%d\n", + le32_to_cpu(ts.timeslice), boot_stage.rmcall_tsg, + status, rpc_result, ret); + if (ret) + return ret; + } memset(&ds, 0, sizeof(ds)); ds.enable = cpu_to_le32(1); - ret = gsp_phys_rmcall_control(bar0, boot_stage.rmcall_device, - GSP_PHYS_RMCALL_CTRL_DEVICE_SCHED, - &ds, sizeof(ds), 16, NULL, 0, &rpc_result, &status, - "NV01 device sched (mode 35 lane enable, R2 #1063)"); - pr_info("vgsp-boot: rm-call: mode 35 lane enable #1063 device sched: enable=%u hDevice=0x%x status=0x%x rpc_result=0x%x ret=%d\n", - le32_to_cpu(ds.enable), boot_stage.rmcall_device, - status, rpc_result, ret); - if (ret) - return ret; + if (skip & 4u) { + pr_info("vgsp-boot: rm-call: mode 35 lane enable #1063 device sched SKIPPED by gsp_phys_rmcall_gr_lane_skip=0x%x\n", + skip); + } else { + ret = gsp_phys_rmcall_control(bar0, boot_stage.rmcall_device, + GSP_PHYS_RMCALL_CTRL_DEVICE_SCHED, + &ds, sizeof(ds), 16, NULL, 0, &rpc_result, + &status, + "NV01 device sched (mode 35 lane enable, R2 #1063)"); + pr_info("vgsp-boot: rm-call: mode 35 lane enable #1063 device sched: enable=%u hDevice=0x%x status=0x%x rpc_result=0x%x ret=%d\n", + le32_to_cpu(ds.enable), boot_stage.rmcall_device, + status, rpc_result, ret); + } + /* + * #1063 is best-effort by design (the server has always refused it + * with 0x1f and the lane still enqueues); do not abort the tail on + * its failure. + */ + ret = 0; /* * R2 #1073/#1075/#1077 lane tail (gsp_phys_rmcall_gr_lane_tail; |
