habanalabs/gaudi: disable GIC usage if security is enabled
authorKoby Elbaz <kelbaz@habana.ai>
Tue, 18 May 2021 12:43:47 +0000 (15:43 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 18 Jun 2021 12:23:40 +0000 (15:23 +0300)
commit3649eaea2754e0d64a5a6726e46093b490c226d7
treeff875f5a50d94cb577c7abe4717d4faa9debd324
parent7feffb6815450bbcbed96a870a36a56f20608640
habanalabs/gaudi: disable GIC usage if security is enabled

Security is set based on PCI ID, and after reading preboot status bits.
GIC usage is set in both scenarios since GIC can't be used when security
is enabled.
Moreover, writing to GIC/SP is enabled only after Linux is fully loaded.

Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/firmware_if.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/gaudi/gaudi.c