|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] spinlock: use local_irq_disable() instead of local_irq_save() where possible
commit 2e9869028ab80f13da79517d4572b5d6044ac228
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Jan 9 17:30:32 2015 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Jan 9 17:30:32 2015 +0100
spinlock: use local_irq_disable() instead of local_irq_save() where possible
... as generally being a cheaper operation.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Tim Deegan <tim@xxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/common/spinlock.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c
index f9f19a8..13340a3 100644
--- a/xen/common/spinlock.c
+++ b/xen/common/spinlock.c
@@ -162,7 +162,7 @@ unsigned long _spin_lock_irqsave(spinlock_t *lock)
local_irq_restore(flags);
while ( likely(_raw_spin_is_locked(&lock->raw)) )
cpu_relax();
- local_irq_save(flags);
+ local_irq_disable();
}
LOCK_PROFILE_GOT;
preempt_disable();
@@ -313,7 +313,7 @@ unsigned long _read_lock_irqsave(rwlock_t *lock)
local_irq_restore(flags);
while ( (x = lock->lock) & RW_WRITE_FLAG )
cpu_relax();
- local_irq_save(flags);
+ local_irq_disable();
}
} while ( cmpxchg(&lock->lock, x, x+1) != x );
preempt_disable();
@@ -409,7 +409,7 @@ unsigned long _write_lock_irqsave(rwlock_t *lock)
local_irq_restore(flags);
while ( (x = lock->lock) & RW_WRITE_FLAG )
cpu_relax();
- local_irq_save(flags);
+ local_irq_disable();
}
} while ( cmpxchg(&lock->lock, x, x|RW_WRITE_FLAG) != x );
while ( x != 0 )
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |