The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 01/11] habanalabs: return correct clock throttling period
@ 2021-12-14 15:05 Oded Gabbay
  2021-12-14 15:05 ` [PATCH 02/11] habanalabs: remove in_debug check in device open Oded Gabbay
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Oded Gabbay @ 2021-12-14 15:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ofir Bitton

From: Ofir Bitton <obitton@habana.ai>

Current clock throttling period returned from driver was wrong due
to wrong time comparison.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
 drivers/misc/habanalabs/common/habanalabs_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/habanalabs/common/habanalabs_ioctl.c b/drivers/misc/habanalabs/common/habanalabs_ioctl.c
index 9210114beefe..f571641c19ae 100644
--- a/drivers/misc/habanalabs/common/habanalabs_ioctl.c
+++ b/drivers/misc/habanalabs/common/habanalabs_ioctl.c
@@ -335,9 +335,9 @@ static int clk_throttle_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
 			ktime_to_us(hdev->clk_throttling.timestamp[i].start);
 
 		if (ktime_compare(hdev->clk_throttling.timestamp[i].end, zero_time))
-			end_time = ktime_get();
-		else
 			end_time = hdev->clk_throttling.timestamp[i].end;
+		else
+			end_time = ktime_get();
 
 		clk_throttle.clk_throttling_duration_ns[i] =
 			ktime_to_ns(ktime_sub(end_time,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-12-14 15:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14 15:05 [PATCH 01/11] habanalabs: return correct clock throttling period Oded Gabbay
2021-12-14 15:05 ` [PATCH 02/11] habanalabs: remove in_debug check in device open Oded Gabbay
2021-12-14 15:05 ` [PATCH 03/11] habanalabs: add current PI value to cpu packets Oded Gabbay
2021-12-14 15:05 ` [PATCH 04/11] habanalabs: fix hwmon handling for legacy f/w Oded Gabbay
2021-12-14 15:05 ` [PATCH 05/11] habanalabs: keep control device alive during hard reset Oded Gabbay
2021-12-14 15:05 ` [PATCH 06/11] habanalabs: sysfs support for two infineon versions Oded Gabbay
2021-12-14 15:05 ` [PATCH 07/11] habanalabs: expose soft reset sysfs nodes for inference ASIC Oded Gabbay
2021-12-14 15:05 ` [PATCH 08/11] habanalabs: clean MMU headers definitions Oded Gabbay
2021-12-14 15:05 ` [PATCH 09/11] habanalabs: modify cpu boot status error print Oded Gabbay
2021-12-14 15:05 ` [PATCH 10/11] habanalabs: prevent wait if CS in multi-CS list completed Oded Gabbay
2021-12-14 15:05 ` [PATCH 11/11] habanalabs: change wait_for_interrupt implementation Oded Gabbay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox