summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/common/hw_queue.c
diff options
context:
space:
mode:
authorTomer Tayar <ttayar@habana.ai>2020-10-30 11:16:23 +0200
committerOded Gabbay <ogabbay@kernel.org>2020-11-30 10:47:34 +0200
commit804a72276cc4a1e27822d611907350b74f7fe561 (patch)
tree0e444c4dc8d4575f0ac1e6216d84debb26cdc625 /drivers/misc/habanalabs/common/hw_queue.c
parent784b916dad2f9968bf732b061914390db24ddf8a (diff)
downloadlinux-804a72276cc4a1e27822d611907350b74f7fe561.tar.bz2
habanalabs: Rename hw_queues_mirror to cs_mirror
Future command submission types might be submitted to HW not via the QMAN queues path. However, it would be still required to have the TDR mechanism for these CS, and thus the patch renames the TDR fields and replaces the hw_queues_ prefix with cs_. Signed-off-by: Tomer Tayar <ttayar@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/hw_queue.c')
-rw-r--r--drivers/misc/habanalabs/common/hw_queue.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/misc/habanalabs/common/hw_queue.c b/drivers/misc/habanalabs/common/hw_queue.c
index f9550fcf5500..d1d30fb36410 100644
--- a/drivers/misc/habanalabs/common/hw_queue.c
+++ b/drivers/misc/habanalabs/common/hw_queue.c
@@ -578,20 +578,20 @@ int hl_hw_queue_schedule_cs(struct hl_cs *cs)
else if (cs->type == CS_TYPE_COLLECTIVE_WAIT)
hdev->asic_funcs->collective_wait_init_cs(cs);
- spin_lock(&hdev->hw_queues_mirror_lock);
- list_add_tail(&cs->mirror_node, &hdev->hw_queues_mirror_list);
+ spin_lock(&hdev->cs_mirror_lock);
+ list_add_tail(&cs->mirror_node, &hdev->cs_mirror_list);
/* Queue TDR if the CS is the first entry and if timeout is wanted */
if ((hdev->timeout_jiffies != MAX_SCHEDULE_TIMEOUT) &&
- (list_first_entry(&hdev->hw_queues_mirror_list,
+ (list_first_entry(&hdev->cs_mirror_list,
struct hl_cs, mirror_node) == cs)) {
cs->tdr_active = true;
schedule_delayed_work(&cs->work_tdr, hdev->timeout_jiffies);
- spin_unlock(&hdev->hw_queues_mirror_lock);
- } else {
- spin_unlock(&hdev->hw_queues_mirror_lock);
+
}
+ spin_unlock(&hdev->cs_mirror_lock);
+
if (!hdev->cs_active_cnt++) {
struct hl_device_idle_busy_ts *ts;