aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/paravirt.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-09 08:33:33 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-16 05:15:53 -0400
commit4bb689eee12ceb6d669a0c9a519037c049a8af38 (patch)
treec234cc9f7b1bc79d5fbe710933f792ff10de86f3 /arch/x86/kernel/paravirt.c
parent2d9e1e2f58b5612aa4eab0ab54c84308a29dbd79 (diff)
x86: paravirt spinlocks, !CONFIG_SMP build fixes
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/paravirt.c')
-rw-r--r--arch/x86/kernel/paravirt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index bba4041bb7ff..6aa8aed06d54 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -270,11 +270,13 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
270 270
271void __init paravirt_use_bytelocks(void) 271void __init paravirt_use_bytelocks(void)
272{ 272{
273#ifdef CONFIG_SMP
273 pv_lock_ops.spin_is_locked = __byte_spin_is_locked; 274 pv_lock_ops.spin_is_locked = __byte_spin_is_locked;
274 pv_lock_ops.spin_is_contended = __byte_spin_is_contended; 275 pv_lock_ops.spin_is_contended = __byte_spin_is_contended;
275 pv_lock_ops.spin_lock = __byte_spin_lock; 276 pv_lock_ops.spin_lock = __byte_spin_lock;
276 pv_lock_ops.spin_trylock = __byte_spin_trylock; 277 pv_lock_ops.spin_trylock = __byte_spin_trylock;
277 pv_lock_ops.spin_unlock = __byte_spin_unlock; 278 pv_lock_ops.spin_unlock = __byte_spin_unlock;
279#endif
278} 280}
279 281
280struct pv_info pv_info = { 282struct pv_info pv_info = {
@@ -461,12 +463,14 @@ struct pv_mmu_ops pv_mmu_ops = {
461}; 463};
462 464
463struct pv_lock_ops pv_lock_ops = { 465struct pv_lock_ops pv_lock_ops = {
466#ifdef CONFIG_SMP
464 .spin_is_locked = __ticket_spin_is_locked, 467 .spin_is_locked = __ticket_spin_is_locked,
465 .spin_is_contended = __ticket_spin_is_contended, 468 .spin_is_contended = __ticket_spin_is_contended,
466 469
467 .spin_lock = __ticket_spin_lock, 470 .spin_lock = __ticket_spin_lock,
468 .spin_trylock = __ticket_spin_trylock, 471 .spin_trylock = __ticket_spin_trylock,
469 .spin_unlock = __ticket_spin_unlock, 472 .spin_unlock = __ticket_spin_unlock,
473#endif
470}; 474};
471 475
472EXPORT_SYMBOL_GPL(pv_time_ops); 476EXPORT_SYMBOL_GPL(pv_time_ops);