diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2021-08-17 13:36:06 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-09-01 18:38:24 +0300 |
commit | e1b61f8e975ae3de555b9fa1f2939f47c70afeba (patch) | |
tree | f78bef89e83a1cff28b5f6bff93bd1162f070ca5 /drivers/misc | |
parent | 6be42f0a1c3a0745f0d42572654a443e09b2470b (diff) | |
download | linux-e1b61f8e975ae3de555b9fa1f2939f47c70afeba.tar.xz |
habanalabs/gaudi: invalidate PMMU mem cache on init
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/gaudi/gaudi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index a41e2ddff9c7..0a265dfee78f 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -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); |