[openib-general] [PATCH 2/5] No need to disable interrupts for mmap locking.

Steve Wise swise at opengridcomputing.com
Thu Feb 8 12:26:38 PST 2007


From: Steve Wise <swise at opengridcomputing.com>

Lock mmap_lock is never taken from non-process context, so just use
bare spin_lock()/spin_unlock().

Signed-off-by: Steve Wise <swise at opengridcomputing.com>
---

 drivers/infiniband/hw/cxgb3/iwch_provider.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.h b/drivers/infiniband/hw/cxgb3/iwch_provider.h
index a8cfeaf..1ede8a7 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.h
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.h
@@ -205,29 +205,29 @@ static inline struct iwch_mm_entry *remo
 	struct list_head *pos, *nxt;
 	struct iwch_mm_entry *mm;
 
-	spin_lock_irq(&ucontext->mmap_lock);
+	spin_lock(&ucontext->mmap_lock);
 	list_for_each_safe(pos, nxt, &ucontext->mmaps) {
 
 		mm = list_entry(pos, struct iwch_mm_entry, entry);
 		if (mm->addr == addr && mm->len == len) {
 			list_del_init(&mm->entry);
-			spin_unlock_irq(&ucontext->mmap_lock);
+			spin_unlock(&ucontext->mmap_lock);
 			PDBG("%s addr 0x%llx len %d\n", __FUNCTION__, mm->addr,
 			     mm->len);
 			return mm;
 		}
 	}
-	spin_unlock_irq(&ucontext->mmap_lock);
+	spin_unlock(&ucontext->mmap_lock);
 	return NULL;
 }
 
 static inline void insert_mmap(struct iwch_ucontext *ucontext,
 			       struct iwch_mm_entry *mm)
 {
-	spin_lock_irq(&ucontext->mmap_lock);
+	spin_lock(&ucontext->mmap_lock);
 	PDBG("%s addr 0x%llx len %d\n", __FUNCTION__, mm->addr, mm->len);
 	list_add_tail(&mm->entry, &ucontext->mmaps);
-	spin_unlock_irq(&ucontext->mmap_lock);
+	spin_unlock(&ucontext->mmap_lock);
 }
 
 enum iwch_qp_attr_mask {




More information about the general mailing list