]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/process.c
Merge branch 'linus' into x86/apic
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / process.c
index 89537f678b2da46df732f0f57b525dc41fdd5e65..87b69d4fac164d9614ccc6cf750cf4c890e43b4a 100644 (file)
@@ -180,6 +180,9 @@ void mwait_idle_with_hints(unsigned long ax, unsigned long cx)
 
        trace_power_start(&it, POWER_CSTATE, (ax>>4)+1);
        if (!need_resched()) {
+               if (cpu_has(&current_cpu_data, X86_FEATURE_CLFLUSH_MONITOR))
+                       clflush((void *)&current_thread_info()->flags);
+
                __monitor((void *)&current_thread_info()->flags, 0, 0);
                smp_mb();
                if (!need_resched())
@@ -194,6 +197,9 @@ static void mwait_idle(void)
        struct power_trace it;
        if (!need_resched()) {
                trace_power_start(&it, POWER_CSTATE, 1);
+               if (cpu_has(&current_cpu_data, X86_FEATURE_CLFLUSH_MONITOR))
+                       clflush((void *)&current_thread_info()->flags);
+
                __monitor((void *)&current_thread_info()->flags, 0, 0);
                smp_mb();
                if (!need_resched())