diff options
author | Joshua Bakita <bakitajoshua@gmail.com> | 2023-07-18 10:49:19 -0400 |
---|---|---|
committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-07-18 10:49:19 -0400 |
commit | a1598f27a124cb0b5263276f7098ae3a68460b61 (patch) | |
tree | 8593b040bb609a67b8bab8dad745b59cbe8f16c9 /runlist.c | |
parent | 073e8978334a07e0053ee08310743ddf3046d7d2 (diff) |
Fail reads which return the flag value for a non-existent register
Also check for read success in get_runlist_iter().
Diffstat (limited to 'runlist.c')
-rw-r--r-- | runlist.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -41,6 +41,8 @@ int get_runlist_iter(struct nvdebug_state *g, int rl_id, struct runlist_iter *rl | |||
41 | // before because the GPU had simply gone to sleep and invalidated its | 41 | // before because the GPU had simply gone to sleep and invalidated its |
42 | // register state, so nvgpu_readl() was simply returning garbage. | 42 | // register state, so nvgpu_readl() was simply returning garbage. |
43 | rl_info.raw = nvdebug_readl(g, NV_PFIFO_ENG_RUNLIST(rl_id)); | 43 | rl_info.raw = nvdebug_readl(g, NV_PFIFO_ENG_RUNLIST(rl_id)); |
44 | if (rl_info.raw == -1) | ||
45 | return -EIO; | ||
44 | runlist_iova = ((u64)rl_base.ptr) << 12; | 46 | runlist_iova = ((u64)rl_base.ptr) << 12; |
45 | printk(KERN_INFO "[nvdebug] Runlist %d @ %llx in %s (config raw: %x)\n", | 47 | printk(KERN_INFO "[nvdebug] Runlist %d @ %llx in %s (config raw: %x)\n", |
46 | rl_id, runlist_iova, target_to_text(rl_base.target), rl_base.raw); | 48 | rl_id, runlist_iova, target_to_text(rl_base.target), rl_base.raw); |