Commit 01907ba5 authored by Tomer Tayar's avatar Tomer Tayar Committed by Oded Gabbay
Browse files

habanalabs: increase the size of busy engines mask



Increase the size of the busy engines mask in 'struct hl_info_hw_idle',
for future ASICs with more than 128 engines.

Signed-off-by: default avatarTomer Tayar <ttayar@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 18cd9482
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -416,8 +416,9 @@ static void hpriv_release(struct kref *ref)
		device_is_idle = hdev->asic_funcs->is_device_idle(hdev, idle_mask,
							HL_BUSY_ENGINES_MASK_EXT_SIZE, NULL);
	if (!device_is_idle) {
		dev_err(hdev->dev, "device not idle after user context is closed (0x%llx_%llx)\n",
			idle_mask[1], idle_mask[0]);
		dev_err(hdev->dev,
			"device not idle after user context is closed (0x%llx_%llx_%llx_%llx)\n",
			idle_mask[3], idle_mask[2], idle_mask[1], idle_mask[0]);
		reset_device = true;
	}

@@ -1661,8 +1662,8 @@ int hl_device_reset(struct hl_device *hdev, u32 flags)
	/* If device is not idle fail the reset process */
	if (!hdev->asic_funcs->is_device_idle(hdev, idle_mask,
			HL_BUSY_ENGINES_MASK_EXT_SIZE, NULL)) {
		dev_err(hdev->dev, "device is not idle (mask 0x%llx_%llx) after reset\n",
			idle_mask[1], idle_mask[0]);
		dev_err(hdev->dev, "device is not idle (mask 0x%llx_%llx_%llx_%llx) after reset\n",
			idle_mask[3], idle_mask[2], idle_mask[1], idle_mask[0]);
		rc = -EIO;
		goto out_err;
	}
+1 −1
Original line number Diff line number Diff line
@@ -916,7 +916,7 @@ struct hl_info_dram_usage {
	__u64 ctx_dram_mem;
};

#define HL_BUSY_ENGINES_MASK_EXT_SIZE	2
#define HL_BUSY_ENGINES_MASK_EXT_SIZE	4

struct hl_info_hw_idle {
	__u32 is_idle;