gpu: nvgpu: update debug print in rpc recieve

To aid debugging in the RPC receive path, this patch updates debug
prints to include the received physical address and nvgpu mem address.

JIRA NVGPU-9283

Change-Id: I71917c1ec6594ae57f836df3968c10ce4b1d1bf3
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2854022
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Rajesh Devaraj
2023-02-06 19:44:59 +00:00
committed by mobile promotions
parent e3e80f8d26
commit 356812d2c4

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2017-2023, NVIDIA CORPORATION. All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
@@ -134,6 +134,7 @@ static inline u32 *sim_recv_ring_bfr(struct gk20a *g, u32 byte_offset)
static int rpc_recv_poll(struct gk20a *g) static int rpc_recv_poll(struct gk20a *g)
{ {
u64 recv_phys_addr; u64 recv_phys_addr;
u64 nvgpu_mem_addr;
/* XXX This read is not required (?) */ /* XXX This read is not required (?) */
/*pVGpu->recv_ring_get = VGPU_REG_RD32(pGpu, NV_VGPU_RECV_GET);*/ /*pVGpu->recv_ring_get = VGPU_REG_RD32(pGpu, NV_VGPU_RECV_GET);*/
@@ -157,10 +158,14 @@ static int rpc_recv_poll(struct gk20a *g)
recv_phys_addr = (u64)recv_phys_addr_hi << 32 | recv_phys_addr = (u64)recv_phys_addr_hi << 32 |
(u64)recv_phys_addr_lo << sim_dma_addr_lo_b(); (u64)recv_phys_addr_lo << sim_dma_addr_lo_b();
if (recv_phys_addr != nvgpu_mem_addr = nvgpu_mem_get_addr(g, &g->sim->msg_bfr);
nvgpu_mem_get_addr(g, &g->sim->msg_bfr)) {
nvgpu_err(g, "%s Error in RPC reply", if (recv_phys_addr != nvgpu_mem_addr) {
__func__); nvgpu_err(g, "%s Error in RPC reply: "
"recv_phys_addr(0x%llx), "
"nvgpu_mem_addr(0x%llx)",
__func__, recv_phys_addr,
nvgpu_mem_addr);
return -1; return -1;
} }