habanalabs: cap simulator timeout
authorOded Gabbay <oded.gabbay@gmail.com>
Thu, 18 Jul 2019 08:14:37 +0000 (11:14 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 5 Sep 2019 11:55:26 +0000 (14:55 +0300)
commited0fc50535ee32ce6a09f4eca84b6ac1a3b1064f
tree03be5352f5068e7920a07f677567ddfd104a1bc8
parent52a1ae115a68272325a327c229f5af44ba324132
habanalabs: cap simulator timeout

In the driver timeout functions, we give the simulator a factor of 10
in the timeout. This was necessary when the requested timeout is small
but if it was a few seconds, this can result in a very large timeout which
is unnecessary.

This patch caps the maximum timeout of the simulator to 10 seconds, which
is our largest timeout in the code. That is more then enough for anything
the simulator is doing.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai>
drivers/misc/habanalabs/habanalabs.h