blob: 676b8c77a97613f098f6e9022abdf02d2ef8a3e8 [file] [log] [blame]
Jeremy Fitzhardinged5de8842008-07-23 13:28:58 -07001/*
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
Ingo Molnar087052b2008-10-17 16:09:57 +020010static inline void
Thomas Gleixner445c8952009-12-02 19:49:50 +010011default_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)
Jeremy Fitzhardinge63d3a752008-08-19 13:19:36 -070012{
Thomas Gleixner0199c4e2009-12-02 20:01:25 +010013 arch_spin_lock(lock);
Jeremy Fitzhardinge63d3a752008-08-19 13:19:36 -070014}
15
Jeremy Fitzhardinged5de8842008-07-23 13:28:58 -070016struct 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,
Jeremy Fitzhardinge63d3a752008-08-19 13:19:36 -070022 .spin_lock_flags = default_spin_lock_flags,
Jeremy Fitzhardinged5de8842008-07-23 13:28:58 -070023 .spin_trylock = __ticket_spin_trylock,
24 .spin_unlock = __ticket_spin_unlock,
25#endif
26};
Jeremy Fitzhardinge25258ef2008-08-20 11:31:07 -070027EXPORT_SYMBOL(pv_lock_ops);
Jeremy Fitzhardinged5de8842008-07-23 13:28:58 -070028