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 <[email protected]>
  • Loading branch information
ogabbay committed Sep 1, 2021
1 parent 6be42f0 commit e1b61f8
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 @@ -3905,6 +3905,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 e1b61f8

Please sign in to comment.