![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 /* 0003 * ARM simple delay routines 0004 */ 0005 0006 #ifndef SELFTEST_KVM_ARM_DELAY_H 0007 #define SELFTEST_KVM_ARM_DELAY_H 0008 0009 #include "arch_timer.h" 0010 0011 static inline void __delay(uint64_t cycles) 0012 { 0013 enum arch_timer timer = VIRTUAL; 0014 uint64_t start = timer_get_cntct(timer); 0015 0016 while ((timer_get_cntct(timer) - start) < cycles) 0017 cpu_relax(); 0018 } 0019 0020 static inline void udelay(unsigned long usec) 0021 { 0022 __delay(usec_to_cycles(usec)); 0023 } 0024 0025 #endif /* SELFTEST_KVM_ARM_DELAY_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |