security: revalidate rw permissions for sys_splice and sys_vmsplice
[linux-2.6.22.y-op.git] / include / asm-blackfin / delay.h
blob52e7a10d7ff8becd559b8548d000fac4176e21ee
1 #ifndef _BLACKFIN_DELAY_H
2 #define _BLACKFIN_DELAY_H
4 static inline void __delay(unsigned long loops)
7 /* FIXME: Currently the assembler doesn't recognize Loop Register Clobbers,
8 uncomment this as soon those are implemented */
9 /*
10 __asm__ __volatile__ ( "\t LSETUP (1f,1f) LC0= %0\n\t"
11 "1:\t NOP;\n\t"
12 : :"a" (loops)
13 : "LT0","LB0","LC0");
17 __asm__ __volatile__("[--SP] = LC0;\n\t"
18 "[--SP] = LT0;\n\t"
19 "[--SP] = LB0;\n\t"
20 "LSETUP (1f,1f) LC0 = %0;\n\t"
21 "1:\t NOP;\n\t"
22 "LB0 = [SP++];\n\t"
23 "LT0 = [SP++];\n\t"
24 "LC0 = [SP++];\n"
26 :"a" (loops));
29 #include <linux/param.h> /* needed for HZ */
32 * Use only for very small delays ( < 1 msec). Should probably use a
33 * lookup table, really, as the multiplications take much too long with
34 * short delays. This is a "reasonable" implementation, though (and the
35 * first constant multiplications gets optimized away if the delay is
36 * a constant)
38 static inline void udelay(unsigned long usecs)
40 extern unsigned long loops_per_jiffy;
41 __delay(usecs * loops_per_jiffy / (1000000 / HZ));
44 #endif /* defined(_BLACKFIN_DELAY_H) */