]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: partly skip cache flush when in PMMU map flow
authorYuri Nudelman <ynudelman@habana.ai>
Mon, 25 Oct 2021 08:37:25 +0000 (11:37 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:04 +0000 (08:59 +0200)
commitdd98c5d4f2e2904e8fc638134e0f66d020d42f00
treec840e14b287d6308b81d09fc179237a5617dfd7b
parent8dba42fe213af27654afb9001324205b0b2c8c41
habanalabs: partly skip cache flush when in PMMU map flow

The PCI MMU cache is two layered. The upper layer, memcache, uses cache
lines, the bottom layer doesn't.

Hence, after PMMU map operation we have to invalidate memcache, to avoid
the situation where the new entry is already in the cache due to its
cache line being fully in the cache.

However, we do not have to invalidate the lower cache, and here we can
optimize, since cache invalidation is time consuming.

Signed-off-by: Yuri Nudelman <ynudelman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_buffer.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/memory.c