9 #include <linux/sched.h>
11 #include <linux/timex.h>
12 #include <linux/module.h>
16 #include <asm/div64.h>
27 asm volatile(
"0: brct %0,0b" : :
"d" ((loops/2) + 1));
30 static void __udelay_disabled(
unsigned long long usecs)
32 unsigned long cr0,
cr6,
new;
36 clock_saved = local_tick_disable();
39 new = (cr0 & 0xffff00e0) | 0x00000800;
45 set_clock_comparator(end);
52 local_tick_enable(clock_saved);
55 static void __udelay_enabled(
unsigned long long usecs)
63 clock_saved = local_tick_disable();
64 set_clock_comparator(end);
69 local_tick_enable(clock_saved);
83 __udelay_disabled(usecs);
88 __udelay_disabled(usecs);
90 __udelay_enabled(usecs);
95 __udelay_disabled(usecs);
99 __udelay_enabled(usecs);
126 if (nsecs & ~0xfffUL)