x86, mce: remove incorrect __cpuinit for mce_cpu_features()
[linux-2.6] / arch / x86 / kernel / paravirt-spinlocks.c
1 /*
2  * Split spinlock implementation out into its own file, so it can be
3  * compiled in a FTRACE-compatible way.
4  */
5 #include <linux/spinlock.h>
6 #include <linux/module.h>
7
8 #include <asm/paravirt.h>
9
10 static inline void
11 default_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
12 {
13         __raw_spin_lock(lock);
14 }
15
16 struct pv_lock_ops pv_lock_ops = {
17 #ifdef CONFIG_SMP
18         .spin_is_locked = __ticket_spin_is_locked,
19         .spin_is_contended = __ticket_spin_is_contended,
20
21         .spin_lock = __ticket_spin_lock,
22         .spin_lock_flags = default_spin_lock_flags,
23         .spin_trylock = __ticket_spin_trylock,
24         .spin_unlock = __ticket_spin_unlock,
25 #endif
26 };
27 EXPORT_SYMBOL(pv_lock_ops);
28
29 void __init paravirt_use_bytelocks(void)
30 {
31 #ifdef CONFIG_SMP
32         pv_lock_ops.spin_is_locked = __byte_spin_is_locked;
33         pv_lock_ops.spin_is_contended = __byte_spin_is_contended;
34         pv_lock_ops.spin_lock = __byte_spin_lock;
35         pv_lock_ops.spin_trylock = __byte_spin_trylock;
36         pv_lock_ops.spin_unlock = __byte_spin_unlock;
37 #endif
38 }