diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/sim_pci.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/sim_pci.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/sim_pci.c b/drivers/gpu/nvgpu/common/sim_pci.c index edf2a401..5f2344b4 100644 --- a/drivers/gpu/nvgpu/common/sim_pci.c +++ b/drivers/gpu/nvgpu/common/sim_pci.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <nvgpu/sim.h> | 27 | #include <nvgpu/sim.h> |
28 | #include <nvgpu/io.h> | 28 | #include <nvgpu/io.h> |
29 | #include <nvgpu/utils.h> | 29 | #include <nvgpu/utils.h> |
30 | #include <nvgpu/bug.h> | ||
30 | 31 | ||
31 | #include "gk20a/gk20a.h" | 32 | #include "gk20a/gk20a.h" |
32 | 33 | ||
@@ -183,7 +184,7 @@ static int issue_rpc_and_wait(struct gk20a *g) | |||
183 | return 0; | 184 | return 0; |
184 | } | 185 | } |
185 | 186 | ||
186 | static int nvgpu_sim_esc_readl(struct gk20a *g, | 187 | static void nvgpu_sim_esc_readl(struct gk20a *g, |
187 | char *path, u32 index, u32 *data) | 188 | char *path, u32 index, u32 *data) |
188 | { | 189 | { |
189 | int err; | 190 | int err; |
@@ -200,9 +201,12 @@ static int nvgpu_sim_esc_readl(struct gk20a *g, | |||
200 | 201 | ||
201 | err = issue_rpc_and_wait(g); | 202 | err = issue_rpc_and_wait(g); |
202 | 203 | ||
203 | if (!err) | 204 | if (err == 0) { |
204 | memcpy(data, sim_msg_param(g, data_offset + 0xc), sizeof(u32)); | 205 | memcpy(data, sim_msg_param(g, data_offset + 0xc), sizeof(u32)); |
205 | return err; | 206 | } else { |
207 | *data = 0xffffffff; | ||
208 | WARN(1, "issue_rpc_and_wait failed err=%d", err); | ||
209 | } | ||
206 | } | 210 | } |
207 | 211 | ||
208 | static void nvgpu_sim_init_late(struct gk20a *g) | 212 | static void nvgpu_sim_init_late(struct gk20a *g) |