]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita426072d41628ef66ef328bedbbadaf928d95cc9
treecb9e460ceda645a806dc760f96d5347decf43fda
parent998c01a1f0fab737e69175733bafc560a8e898f7
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