habanalabs: add prefetch flag to the MAP operation
authorOhad Sharabi <osharabi@habana.ai>
Sun, 10 Apr 2022 08:19:42 +0000 (11:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 May 2022 19:01:18 +0000 (21:01 +0200)
commit5d1a0de2c778f369970dd50f6713e95068926a8b
treecb9e460ceda645a806dc760f96d5347decf43fda
parent77c97a7ea85f3a1f8d2c3bf54869c0b6638519c7
habanalabs: add prefetch flag to the MAP operation

This patch let the user decide whether the translations done in the
page tables will be fetched directly to the STLB right after the map.

We want to let the user control whether to perform prefetch upon map
operation.

To do so a memory flag was added, to be used in the MAP ioctl, called
HL_MEM_PREFETCH and if set- the mappings will be fetched directly to
the STLB after map operation.

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/habanalabs/common/memory.c
include/uapi/misc/habanalabs.h