]> git.baikalelectronics.ru Git - kernel.git/commitdiff
habanalabs/gaudi2: SM mask can only be 8-bit
authorOded Gabbay <ogabbay@kernel.org>
Thu, 30 Jun 2022 08:53:33 +0000 (11:53 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 12 Jul 2022 06:09:29 +0000 (09:09 +0300)
Otherwise, due to how we calculate it, we might fail in FIELD_PREP
checks.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/gaudi2/gaudi2.c

index ed41673f2f2325d669ef7495c5fc1f34635dbd24..02ec68715c4f912248b8a37c21c21ecca81b2cb9 100644 (file)
@@ -5751,8 +5751,9 @@ static void gaudi2_kdma_set_mmbp_asid(struct hl_device *hdev,
 static void gaudi2_arm_cq_monitor(struct hl_device *hdev, u32 index, u32 cq_id,
                                                u32 mon_payload, u32 sync_value)
 {
+       u32 sync_group_id, mode, mon_arm;
        int offset = index * 4;
-       u32 sync_group_id, mask, mode, mon_arm;
+       u8 mask;
 
        /* Reset the SOB value */
        WREG32(mmDCORE0_SYNC_MNGR_OBJS_SOB_OBJ_0 + offset, 0);