diff options
Diffstat (limited to 'arch/x86/lib/delay_32.c')
-rw-r--r-- | arch/x86/lib/delay_32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/lib/delay_32.c b/arch/x86/lib/delay_32.c index 952e7a8..aad9d95 100644 --- a/arch/x86/lib/delay_32.c +++ b/arch/x86/lib/delay_32.c @@ -12,6 +12,7 @@ #include <linux/module.h> #include <linux/sched.h> +#include <linux/preempt.h> #include <linux/delay.h> #include <asm/processor.h> @@ -42,11 +43,13 @@ static void delay_tsc(unsigned long loops) { unsigned long bclock, now; + preempt_disable(); /* TSC's are per-cpu */ rdtscl(bclock); do { rep_nop(); rdtscl(now); } while ((now-bclock) < loops); + preempt_enable(); } /* |