Changes in kernel/arch/arm32/include/cycle.h [9043e7e0:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/cycle.h
r9043e7e0 r9d58539 38 38 39 39 #include <trace.h> 40 #include <arch/cp15.h>41 40 42 41 /** Return count of CPU cycles. … … 49 48 NO_TRACE static inline uint64_t get_cycle(void) 50 49 { 51 #ifdef PROCESSOR_ARCH_armv7_a52 if ((ID_PFR1_read() & ID_PFR1_GEN_TIMER_EXT_MASK) ==53 ID_PFR1_GEN_TIMER_EXT) {54 uint32_t low = 0, high = 0;55 asm volatile( "MRRC p15, 0, %[low], %[high], c14": [low]"=r"(low), [high]"=r"(high));56 return ((uint64_t)high << 32) | low;57 } else {58 return (uint64_t)PMCCNTR_read() * 64;59 }60 #endif61 50 return 0; 62 51 }
Note:
See TracChangeset
for help on using the changeset viewer.