Commit 42d0b0b9 authored by Omer Shpigelman's avatar Omer Shpigelman Committed by Oded Gabbay

habanalabs: improve MMU cache invalidation code

A new sequence is introduced to invalidate the MMU cache in order to avoid
timeouts.
Signed-off-by: default avatarOmer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
parent ed65bfd9
......@@ -5982,16 +5982,18 @@ static void gaudi_mmu_invalidate_cache(struct hl_device *hdev, bool is_hard,
timeout_usec = MMU_CONFIG_TIMEOUT_USEC;
/* L0 & L1 invalidation */
WREG32(mmSTLB_INV_ALL_START, 1);
WREG32(mmSTLB_INV_PS, 2);
rc = hl_poll_timeout(
hdev,
mmSTLB_INV_ALL_START,
mmSTLB_INV_PS,
status,
!status,
1000,
timeout_usec);
WREG32(mmSTLB_INV_SET, 0);
if (rc)
dev_notice_ratelimited(hdev->dev,
"Timeout when waiting for MMU cache invalidation\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment