mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: address CCM deviations for nvgpu_pmu_rpc_handler
nvgpu_pmu_rpc_handler CCM value was higher than 10. Move the unit specific rpc handling to new function pmu_rpc_handler. JIRA NVGPU-3194 Change-Id: I0cd0576ab626d7fb9713df39ce43d34746fcfad6 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2101939 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
b31eee15b4
commit
3225c8e3b8
@@ -537,28 +537,11 @@ int nvgpu_pmu_process_message(struct nvgpu_pmu *pmu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nvgpu_pmu_rpc_handler(struct gk20a *g, struct pmu_msg *msg,
|
||||
void *param, u32 status)
|
||||
static void pmu_rpc_handler(struct gk20a *g, struct pmu_msg *msg,
|
||||
struct nv_pmu_rpc_header rpc,
|
||||
struct rpc_handler_payload *rpc_payload)
|
||||
{
|
||||
struct nv_pmu_rpc_header rpc;
|
||||
struct nvgpu_pmu *pmu = &g->pmu;
|
||||
struct rpc_handler_payload *rpc_payload =
|
||||
(struct rpc_handler_payload *)param;
|
||||
|
||||
if (nvgpu_can_busy(g) == 0) {
|
||||
return ;
|
||||
}
|
||||
|
||||
(void) memset(&rpc, 0, sizeof(struct nv_pmu_rpc_header));
|
||||
nvgpu_memcpy((u8 *)&rpc, (u8 *)rpc_payload->rpc_buff,
|
||||
sizeof(struct nv_pmu_rpc_header));
|
||||
|
||||
if (rpc.flcn_status != 0U) {
|
||||
nvgpu_err(g,
|
||||
"failed RPC response, unit-id=0x%x, func=0x%x, status=0x%x",
|
||||
rpc.unit_id, rpc.function, rpc.flcn_status);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
switch (msg->hdr.unit_id) {
|
||||
case PMU_UNIT_ACR:
|
||||
@@ -589,6 +572,31 @@ void nvgpu_pmu_rpc_handler(struct gk20a *g, struct pmu_msg *msg,
|
||||
rpc.flcn_status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void nvgpu_pmu_rpc_handler(struct gk20a *g, struct pmu_msg *msg,
|
||||
void *param, u32 status)
|
||||
{
|
||||
struct nv_pmu_rpc_header rpc;
|
||||
struct rpc_handler_payload *rpc_payload =
|
||||
(struct rpc_handler_payload *)param;
|
||||
|
||||
if (nvgpu_can_busy(g) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
(void) memset(&rpc, 0, sizeof(struct nv_pmu_rpc_header));
|
||||
nvgpu_memcpy((u8 *)&rpc, (u8 *)rpc_payload->rpc_buff,
|
||||
sizeof(struct nv_pmu_rpc_header));
|
||||
|
||||
if (rpc.flcn_status != 0U) {
|
||||
nvgpu_err(g,
|
||||
"failed RPC response, unit-id=0x%x, func=0x%x, status=0x%x",
|
||||
rpc.unit_id, rpc.function, rpc.flcn_status);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pmu_rpc_handler(g, msg, rpc, rpc_payload);
|
||||
|
||||
exit:
|
||||
rpc_payload->complete = true;
|
||||
|
||||
Reference in New Issue
Block a user