summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-11-23 02:17:50 +0100
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-11-23 02:19:34 +0100
commitbc15fde77fc5d9ec2eec6066a5ab554ea1266a0a (patch)
tree24cae738550a02a6fe4d00b57c99bb57195cef9f /arch/x86
parentxen: clean up "extra" memory handling some more (diff)
downloadlinux-bc15fde77fc5d9ec2eec6066a5ab554ea1266a0a.tar.xz
linux-bc15fde77fc5d9ec2eec6066a5ab554ea1266a0a.zip
xen: use default_idle
We just need the idle loop to drop into safe_halt, which default_idle() is perfectly capable of doing. There's no need to duplicate it. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/xen/setup.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index b85dceef56f7..95fb68a8c20d 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -250,20 +250,6 @@ char * __init xen_memory_setup(void)
return "Xen";
}
-static void xen_idle(void)
-{
- local_irq_disable();
-
- if (need_resched())
- local_irq_enable();
- else {
- current_thread_info()->status &= ~TS_POLLING;
- smp_mb__after_clear_bit();
- safe_halt();
- current_thread_info()->status |= TS_POLLING;
- }
-}
-
/*
* Set the bit indicating "nosegneg" library variants should be used.
* We only need to bother in pure 32-bit mode; compat 32-bit processes
@@ -360,7 +346,11 @@ void __init xen_arch_setup(void)
MAX_GUEST_CMDLINE > COMMAND_LINE_SIZE ?
COMMAND_LINE_SIZE : MAX_GUEST_CMDLINE);
- pm_idle = xen_idle;
+ /* Set up idle, making sure it calls safe_halt() pvop */
+#ifdef CONFIG_X86_32
+ boot_cpu_data.hlt_works_ok = 1;
+#endif
+ pm_idle = default_idle;
fiddle_vdso();
}