diff options
author | Dani Liberman <dliberman@habana.ai> | 2022-10-30 14:46:19 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-11-23 16:13:46 +0200 |
commit | 413bdb176eaa7d02c979a3c738738aea91fe6ed7 (patch) | |
tree | 666c097d395d4e417f6a8d43337e0868ab9a9040 /drivers/misc/habanalabs/common | |
parent | 91bd822448e57a55d12dc0461909b5c585485a6c (diff) | |
download | linux-stable-413bdb176eaa7d02c979a3c738738aea91fe6ed7.tar.gz linux-stable-413bdb176eaa7d02c979a3c738738aea91fe6ed7.tar.bz2 linux-stable-413bdb176eaa7d02c979a3c738738aea91fe6ed7.zip |
habanalabs/gaudi2: add razwi notify event
Each time razwi (read-only zero, write ignored) event happens, besides
capturing its data, also notify the user about it.
Signed-off-by: Dani Liberman <dliberman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common')
-rw-r--r-- | drivers/misc/habanalabs/common/device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c index 31818121ef4d..708db0f48ee0 100644 --- a/drivers/misc/habanalabs/common/device.c +++ b/drivers/misc/habanalabs/common/device.c @@ -2414,7 +2414,9 @@ void hl_handle_razwi(struct hl_device *hdev, u64 addr, u16 *engine_id, u16 num_o u8 flags, u64 *event_mask) { hl_capture_razwi(hdev, addr, engine_id, num_of_engines, flags); - *event_mask |= HL_NOTIFIER_EVENT_RAZWI; + + if (event_mask) + *event_mask |= HL_NOTIFIER_EVENT_RAZWI; } static void hl_capture_user_mappings(struct hl_device *hdev, bool is_pmmu) |