Skip to content

Commit

Permalink
habanalabs/gaudi: invalidate PMMU mem cache on init
Browse files Browse the repository at this point in the history
This must be done to clear the internal mem cache so we won't get
ecc errors on the first invalidation.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
  • Loading branch information
ogabbay committed Aug 19, 2021
1 parent aaa2403 commit a3f369d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/misc/habanalabs/gaudi/gaudi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3906,6 +3906,9 @@ static int gaudi_mmu_init(struct hl_device *hdev)
WREG32(mmSTLB_CACHE_INV_BASE_39_8, MMU_CACHE_MNG_ADDR >> 8);
WREG32(mmSTLB_CACHE_INV_BASE_49_40, MMU_CACHE_MNG_ADDR >> 40);

/* mem cache invalidation */
WREG32(mmSTLB_MEM_CACHE_INVALIDATION, 1);

hdev->asic_funcs->mmu_invalidate_cache(hdev, true, 0);

WREG32(mmMMU_UP_MMU_ENABLE, 1);
Expand Down

0 comments on commit a3f369d

Please sign in to comment.