aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/spinlock.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-10-22 15:06:01 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-10-22 15:06:01 +0100
commit828dfa9ef2bb3dae3ee29cccbe3d4d75bf56b8a6 (patch)
treeccf08c9ffaa14b3cee443be3ffca637202fabbf3 /xen/common/spinlock.c
parentcdd644ce1082849d20832902d8d5a69b854f8cbe (diff)
downloadxen-828dfa9ef2bb3dae3ee29cccbe3d4d75bf56b8a6.tar.gz
xen-828dfa9ef2bb3dae3ee29cccbe3d4d75bf56b8a6.tar.bz2
xen-828dfa9ef2bb3dae3ee29cccbe3d4d75bf56b8a6.zip
Define spin_barrier_irq() for IRQ-safe spinlocks, and use it for virq_lock.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/spinlock.c')
-rw-r--r--xen/common/spinlock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c
index 15420ebfe7..125e12d1bf 100644
--- a/xen/common/spinlock.c
+++ b/xen/common/spinlock.c
@@ -54,6 +54,14 @@ void _spin_barrier(spinlock_t *lock)
mb();
}
+void _spin_barrier_irq(spinlock_t *lock)
+{
+ unsigned long flags;
+ local_irq_save(flags);
+ _spin_barrier(lock);
+ local_irq_restore(flags);
+}
+
void _spin_lock_recursive(spinlock_t *lock)
{
int cpu = smp_processor_id();