Skip to content

Commit

Permalink
xen idle: make xen-specific macro xen-specific
Browse files Browse the repository at this point in the history
This macro is only invoked by Xen,
so make its definition specific to Xen.

> set_pm_idle_to_default()
< xen_set_default_idle()

Signed-off-by: Len Brown <len.brown@intel.com>
Cc: xen-devel@lists.xensource.com
  • Loading branch information
Len Brown committed Feb 10, 2013
1 parent 88b62b9 commit 6a377dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,11 @@ extern unsigned long arch_align_stack(unsigned long sp);
extern void free_init_pages(char *what, unsigned long begin, unsigned long end);

void default_idle(void);
bool set_pm_idle_to_default(void);
#ifdef CONFIG_XEN
bool xen_set_default_idle(void);
#else
#define xen_set_default_idle 0
#endif

void stop_this_cpu(void *dummy);

Expand Down
4 changes: 3 additions & 1 deletion arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,14 +396,16 @@ void default_idle(void)
EXPORT_SYMBOL(default_idle);
#endif

bool set_pm_idle_to_default(void)
#ifdef CONFIG_XEN
bool xen_set_default_idle(void)
{
bool ret = !!pm_idle;

pm_idle = default_idle;

return ret;
}
#endif
void stop_this_cpu(void *dummy)
{
local_irq_disable();
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/xen/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ void __init xen_arch_setup(void)
#endif
disable_cpuidle();
disable_cpufreq();
WARN_ON(set_pm_idle_to_default());
WARN_ON(xen_set_default_idle());
fiddle_vdso();
#ifdef CONFIG_NUMA
numa_off = 1;
Expand Down

0 comments on commit 6a377dd

Please sign in to comment.