]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Revert "x86 idle: restore mwait_idle()"
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Jan 2014 03:56:05 +0000 (14:56 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Jan 2014 03:56:05 +0000 (14:56 +1100)
This reverts commit 7760518cce95c00ba1cbcbc81c8c1af7fd3425f4.

arch/x86/kernel/process.c

index db471a87fdd881c8a9ac875d545195ade7698181..3fb8d95ab8b5ea3635ddb1f0d9f9c12e3a348285 100644 (file)
@@ -398,49 +398,6 @@ static void amd_e400_idle(void)
                default_idle();
 }
 
-/*
- * Intel Core2 and older machines prefer MWAIT over HALT for C1.
- * We can't rely on cpuidle installing MWAIT, because it will not load
- * on systems that support only C1 -- so the boot default must be MWAIT.
- *  
- * Some AMD machines are the opposite, they depend on using HALT.
- *
- * So for default C1, which is used during boot until cpuidle loads,
- * use MWAIT-C1 on Intel HW that has it, else use HALT.
- */
-static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)
-{
-       if (c->x86_vendor != X86_VENDOR_INTEL)
-               return 0;
-
-       if (!cpu_has(c, X86_FEATURE_MWAIT))
-               return 0;
-
-       return 1;
-}
-
-/*
- * MONITOR/MWAIT with no hints, used for default default C1 state.
- * This invokes MWAIT with interrutps enabled and no flags,
- * which is backwards compatible with the original MWAIT implementation.
- */
-
-static void mwait_idle(void)
-{
-       if (!need_resched()) {
-               if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR))
-                       clflush((void *)&current_thread_info()->flags);
-
-               __monitor((void *)&current_thread_info()->flags, 0, 0);
-               smp_mb();
-               if (!need_resched())
-                       __sti_mwait(0, 0);
-               else
-                       local_irq_enable();
-       } else
-               local_irq_enable();
-}
-
 void select_idle_routine(const struct cpuinfo_x86 *c)
 {
 #ifdef CONFIG_SMP
@@ -454,9 +411,6 @@ void select_idle_routine(const struct cpuinfo_x86 *c)
                /* E400: APIC timer interrupt does not wake up CPU from C1e */
                pr_info("using AMD E400 aware idle routine\n");
                x86_idle = amd_e400_idle;
-       } else if (prefer_mwait_c1_over_halt(c)) {
-               pr_info("using mwait in idle threads\n");
-               x86_idle = mwait_idle;
        } else
                x86_idle = default_idle;
 }