diff options
author | Alon Mizrahi <amizrahi@habana.ai> | 2020-12-03 17:32:19 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-01-27 21:03:49 +0200 |
commit | 75d9a2a0aa28c4519c9648d501825e2c6860cb81 (patch) | |
tree | a2944e71035bc5843d87ff106d3cae1dc6d8b218 /drivers/misc/habanalabs/common/asid.c | |
parent | 0eda23d77e1beede9c61b0cba6d9267d3a92bd4e (diff) |
habanalabs: replace WARN/WARN_ON with dev_crit in driver
Often WARN is defined in data-centers as BUG and we would like to
avoid hanging the entire server on some internal error of the driver
(important as it might be).
Therefore, use dev_crit instead.
Signed-off-by: Alon Mizrahi <amizrahi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/asid.c')
-rw-r--r-- | drivers/misc/habanalabs/common/asid.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/common/asid.c b/drivers/misc/habanalabs/common/asid.c index a2fdf31cf27c..ede04c032b6e 100644 --- a/drivers/misc/habanalabs/common/asid.c +++ b/drivers/misc/habanalabs/common/asid.c @@ -50,8 +50,10 @@ unsigned long hl_asid_alloc(struct hl_device *hdev) void hl_asid_free(struct hl_device *hdev, unsigned long asid) { - if (WARN((asid == 0 || asid >= hdev->asic_prop.max_asid), - "Invalid ASID %lu", asid)) + if (asid == HL_KERNEL_ASID_ID || asid >= hdev->asic_prop.max_asid) { + dev_crit(hdev->dev, "Invalid ASID %lu", asid); return; + } + clear_bit(asid, hdev->asid_bitmap); } |