提交 60b8b1de 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

x86 idle: APM requires pm_idle/default_idle unconditionally when a module

[ Also from Ben Hutchings <ben@decadent.org.uk> and Vitaliy Ivanov
  <vitalivanov@gmail.com> ]

Commit 06ae40ce ("x86 idle: EXPORT_SYMBOL(default_idle, pm_idle)
only when APM demands it") removed the export for pm_idle/default_idle
unless the apm module was modularised and CONFIG_APM_CPU_IDLE was set.

But the apm module uses pm_idle/default_idle unconditionally,
CONFIG_APM_CPU_IDLE only affects the bios idle threshold.  Adjust the
export accordingly.

[ Used #ifdef instead of #if defined() as it's shorter, and what both
  Ben and Vitaliy used.. Andy, you're out-voted ;)    - Linus ]
Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
Acked-by: NJiri Kosina <jkosina@suse.cz>
Acked-by: NIngo Molnar <mingo@elte.hu>
Acked-by: NLen Brown <len.brown@intel.com>
Signed-off-by: NAndy Whitcroft <apw@canonical.com>
Signed-off-by: NVitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 3a2289a4
......@@ -337,7 +337,7 @@ EXPORT_SYMBOL(boot_option_idle_override);
* Powermanagement idle function, if any..
*/
void (*pm_idle)(void);
#if defined(CONFIG_APM_MODULE) && defined(CONFIG_APM_CPU_IDLE)
#ifdef CONFIG_APM_MODULE
EXPORT_SYMBOL(pm_idle);
#endif
......@@ -399,7 +399,7 @@ void default_idle(void)
cpu_relax();
}
}
#if defined(CONFIG_APM_MODULE) && defined(CONFIG_APM_CPU_IDLE)
#ifdef CONFIG_APM_MODULE
EXPORT_SYMBOL(default_idle);
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册