[PATCH 21/25] cobalt/clock: dovetail: implement pipeline_read_cycle_counter()

Jan Kiszka jan.kiszka at siemens.com
Thu May 20 23:44:31 CEST 2021


From: Hongzhan Chen <hongzhan.chen at intel.com>

Signed-off-by: Hongzhan Chen <hongzhan.chen at intel.com>
Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
---
 include/cobalt/kernel/dovetail/pipeline/clock.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/cobalt/kernel/dovetail/pipeline/clock.h b/include/cobalt/kernel/dovetail/pipeline/clock.h
index 82f02d4d77..6761ed70db 100644
--- a/include/cobalt/kernel/dovetail/pipeline/clock.h
+++ b/include/cobalt/kernel/dovetail/pipeline/clock.h
@@ -14,9 +14,7 @@ struct timespec64;
 static inline u64 pipeline_read_cycle_counter(void)
 {
 	/* Read the raw cycle counter of the core clock. */
-	TODO();
-
-	return 0;
+	return  ktime_get_raw_fast_ns();
 }
 
 void pipeline_set_timer_shot(unsigned long cycles);
-- 
2.26.2




More information about the Xenomai mailing list