diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-11-22 20:17:50 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-11-22 20:19:34 -0500 |
commit | bc15fde77fc5d9ec2eec6066a5ab554ea1266a0a (patch) | |
tree | 24cae738550a02a6fe4d00b57c99bb57195cef9f | |
parent | c2d0879112825cddddd6c4f9b2645ff32acd6dc5 (diff) |
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>
-rw-r--r-- | arch/x86/xen/setup.c | 20 |
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) | |||
250 | return "Xen"; | 250 | return "Xen"; |
251 | } | 251 | } |
252 | 252 | ||
253 | static void xen_idle(void) | ||
254 | { | ||
255 | local_irq_disable(); | ||
256 | |||
257 | if (need_resched()) | ||
258 | local_irq_enable(); | ||
259 | else { | ||
260 | current_thread_info()->status &= ~TS_POLLING; | ||
261 | smp_mb__after_clear_bit(); | ||
262 | safe_halt(); | ||
263 | current_thread_info()->status |= TS_POLLING; | ||
264 | } | ||
265 | } | ||
266 | |||
267 | /* | 253 | /* |
268 | * Set the bit indicating "nosegneg" library variants should be used. | 254 | * Set the bit indicating "nosegneg" library variants should be used. |
269 | * We only need to bother in pure 32-bit mode; compat 32-bit processes | 255 | * We only need to bother in pure 32-bit mode; compat 32-bit processes |
@@ -360,7 +346,11 @@ void __init xen_arch_setup(void) | |||
360 | MAX_GUEST_CMDLINE > COMMAND_LINE_SIZE ? | 346 | MAX_GUEST_CMDLINE > COMMAND_LINE_SIZE ? |
361 | COMMAND_LINE_SIZE : MAX_GUEST_CMDLINE); | 347 | COMMAND_LINE_SIZE : MAX_GUEST_CMDLINE); |
362 | 348 | ||
363 | pm_idle = xen_idle; | 349 | /* Set up idle, making sure it calls safe_halt() pvop */ |
350 | #ifdef CONFIG_X86_32 | ||
351 | boot_cpu_data.hlt_works_ok = 1; | ||
352 | #endif | ||
353 | pm_idle = default_idle; | ||
364 | 354 | ||
365 | fiddle_vdso(); | 355 | fiddle_vdso(); |
366 | } | 356 | } |