mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
habanalabs: verify no zero event is sent
The event notifier mechanism should not raise an empty event (event equals zero). Signed-off-by: Tal Cohen <talcohen@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
4f11694f27
commit
27cd39afde
@ -1746,6 +1746,11 @@ void hl_notifier_event_send_all(struct hl_device *hdev, u64 event_mask)
|
||||
{
|
||||
struct hl_fpriv *hpriv;
|
||||
|
||||
if (!event_mask) {
|
||||
dev_warn(hdev->dev, "Skip sending zero event");
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&hdev->fpriv_list_lock);
|
||||
|
||||
list_for_each_entry(hpriv, &hdev->fpriv_list, dev_node)
|
||||
|
@ -7945,7 +7945,9 @@ reset_device:
|
||||
/* despite reset doesn't execute. a notification on
|
||||
* occurred event needs to be sent here
|
||||
*/
|
||||
hl_notifier_event_send_all(hdev, event_mask);
|
||||
if (event_mask)
|
||||
hl_notifier_event_send_all(hdev, event_mask);
|
||||
|
||||
if (reset_required)
|
||||
hl_device_reset(hdev, flags);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user