[PATCH 02/10] dovetail/clock: implement pipeline_read_cycle_counter

hongzha1 hongzhan.chen at intel.com
Mon Jan 11 07:43:10 CET 2021


Signed-off-by: hongzha1 <hongzhan.chen at intel.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 19e3d8986..5176b1506 100644
--- a/include/cobalt/kernel/dovetail/pipeline/clock.h
+++ b/include/cobalt/kernel/dovetail/pipeline/clock.h
@@ -13,9 +13,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();
 }
 
 static inline void pipeline_set_timer_shot(unsigned long cycles)
-- 
2.17.1




More information about the Xenomai mailing list