Merge tag 'locking-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / um / include / asm / delay.h
blob56fc2b8f2dd019ec8b75065f2a7f2c791c0c2d7a
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __UM_DELAY_H
3 #define __UM_DELAY_H
4 #include <asm-generic/delay.h>
5 #include <linux/time-internal.h>
7 static inline void um_ndelay(unsigned long nsecs)
9 if (time_travel_mode == TT_MODE_INFCPU ||
10 time_travel_mode == TT_MODE_EXTERNAL) {
11 time_travel_ndelay(nsecs);
12 return;
14 ndelay(nsecs);
16 #undef ndelay
17 #define ndelay um_ndelay
19 static inline void um_udelay(unsigned long usecs)
21 if (time_travel_mode == TT_MODE_INFCPU ||
22 time_travel_mode == TT_MODE_EXTERNAL) {
23 time_travel_ndelay(1000 * usecs);
24 return;
26 udelay(usecs);
28 #undef udelay
29 #define udelay um_udelay
30 #endif /* __UM_DELAY_H */