Browse Source

cpuidle: upon BIOS bug, default to default_idle rather than polling

http://bugzilla.kernel.org/show_bug.cgi?id=11345

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Venkatesh Pallipadi 16 years ago
parent
commit
89cedfefca
2 changed files with 7 additions and 0 deletions
  1. 3 0
      arch/x86/Kconfig
  2. 4 0
      drivers/cpuidle/cpuidle.c

+ 3 - 0
arch/x86/Kconfig

@@ -123,6 +123,9 @@ config GENERIC_TIME_VSYSCALL
 config ARCH_HAS_CPU_RELAX
 config ARCH_HAS_CPU_RELAX
 	def_bool y
 	def_bool y
 
 
+config ARCH_HAS_DEFAULT_IDLE
+	def_bool y
+
 config ARCH_HAS_CACHE_LINE_SIZE
 config ARCH_HAS_CACHE_LINE_SIZE
 	def_bool y
 	def_bool y
 
 

+ 4 - 0
drivers/cpuidle/cpuidle.c

@@ -56,7 +56,11 @@ static void cpuidle_idle_call(void)
 		if (pm_idle_old)
 		if (pm_idle_old)
 			pm_idle_old();
 			pm_idle_old();
 		else
 		else
+#if defined(CONFIG_ARCH_HAS_DEFAULT_IDLE)
+			default_idle();
+#else
 			local_irq_enable();
 			local_irq_enable();
+#endif
 		return;
 		return;
 	}
 	}