]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: Support trace on armv8
authorSimon Glass <sjg@chromium.org>
Wed, 21 Dec 2022 23:08:16 +0000 (16:08 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 18 Jan 2023 18:49:13 +0000 (11:49 -0700)
Use the notrace attribute so that timer functions can be used when
tracing. This is required to avoid infinite loops when recording a trace.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/arm/cpu/armv8/generic_timer.c

index f27a74b9d09b9a553688eec341f38aed7638acf7..8f83372cbca40c534cee1513bd5b5b043f4704a4 100644 (file)
@@ -17,7 +17,7 @@ DECLARE_GLOBAL_DATA_PTR;
 /*
  * Generic timer implementation of get_tbclk()
  */
-unsigned long get_tbclk(void)
+unsigned long notrace get_tbclk(void)
 {
        unsigned long cntfrq;
        asm volatile("mrs %0, cntfrq_el0" : "=r" (cntfrq));
@@ -78,7 +78,7 @@ unsigned long timer_read_counter(void)
 /*
  * timer_read_counter() using the Arm Generic Timer (aka arch timer).
  */
-unsigned long timer_read_counter(void)
+unsigned long notrace timer_read_counter(void)
 {
        unsigned long cntpct;
 
@@ -89,7 +89,7 @@ unsigned long timer_read_counter(void)
 }
 #endif
 
-uint64_t get_ticks(void)
+uint64_t notrace get_ticks(void)
 {
        unsigned long ticks = timer_read_counter();