OSDN Git Service

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)
commit6ccba9a3bca95a24fd936e3c3542cf2ff2941b0f
treec840e14b287d6308b81d09fc179237a5617dfd7b
parent82e5169e8adfff331169613808b45a6cfb030e81
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