--- zzzz-none-000/linux-3.10.107/arch/arm/include/asm/timex.h 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/arch/arm/include/asm/timex.h 2021-11-10 11:53:52.000000000 +0000 @@ -17,8 +17,12 @@ #else #include #endif - typedef unsigned long cycles_t; +#if defined(CONFIG_AVM_ENHANCED) && defined(CONFIG_ARCH_IPQ806X_DT) +/*--- compatible to mips: 1 cycle == cpu_freq / 2 ---*/ +#define get_cycles() ({ cycles_t c; __asm__ __volatile__ ("mrc p15, 0, %0, c9, c13, 0" : "=r" (c)); (c) << 5; }) +#else/*--- #if defined(CONFIG_AVM_ENHANCED) ---*/ #define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; }) +#endif/*--- #else ---*//*--- #if defined(CONFIG_AVM_ENHANCED) ---*/ #endif