]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
exynos: Avoid function instrumentation for microsecond timer
authorSimon Glass <sjg@chromium.org>
Tue, 11 Jun 2013 18:14:50 +0000 (11:14 -0700)
committerTom Rini <trini@ti.com>
Wed, 26 Jun 2013 14:18:56 +0000 (10:18 -0400)
For tracing to work it has to be able to access the microsecond timer
without causing a recursive call to the function entry/exit handlers.
Add attributes to the relevant functions to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/arm/cpu/armv7/s5p-common/timer.c
arch/arm/include/asm/arch-exynos/cpu.h

index 4adfaae656da8f378639939def0e84c24f960878..637593c3397a811103c6013117f4a4c8d5ecc439 100644 (file)
@@ -95,7 +95,7 @@ unsigned long get_timer(unsigned long base)
        return time_ms - base;
 }
 
-unsigned long timer_get_us(void)
+unsigned long __attribute__((no_instrument_function)) timer_get_us(void)
 {
        static unsigned long base_time_us;
 
index 36b98c83e19c53b08fbdecdf2f55422dc38d2df1..1ff7642d069c10d4d217c73c6cc6f4bde737f56e 100644 (file)
@@ -178,7 +178,7 @@ static inline char *s5p_get_cpu_name(void)
 }
 
 #define IS_SAMSUNG_TYPE(type, id)                      \
-static inline int cpu_is_##type(void)                  \
+static inline int __attribute__((no_instrument_function)) cpu_is_##type(void) \
 {                                                      \
        return (s5p_cpu_id >> 12) == id;                \
 }
@@ -187,7 +187,8 @@ IS_SAMSUNG_TYPE(exynos4, 0x4)
 IS_SAMSUNG_TYPE(exynos5, 0x5)
 
 #define IS_EXYNOS_TYPE(type, id)                       \
-static inline int proid_is_##type(void)                        \
+static inline int __attribute__((no_instrument_function)) \
+       proid_is_##type(void)                           \
 {                                                      \
        return s5p_cpu_id == id;                        \
 }
@@ -197,9 +198,10 @@ IS_EXYNOS_TYPE(exynos4412, 0x4412)
 IS_EXYNOS_TYPE(exynos5250, 0x5250)
 
 #define SAMSUNG_BASE(device, base)                             \
-static inline unsigned int samsung_get_base_##device(void)     \
+static inline unsigned int __attribute__((no_instrument_function)) \
+       samsung_get_base_##device(void) \
 {                                                              \
-       if (cpu_is_exynos4()) {                                 \
+       if (cpu_is_exynos4()) {                         \
                if (proid_is_exynos4412())                      \
                        return EXYNOS4X12_##base;               \
                return EXYNOS4_##base;                          \