aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_cq.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-02-01 00:14:18 -0500
committerRoland Dreier <rolandd@cisco.com>2006-03-20 13:08:07 -0500
commit399d7921299fc4f146bd62bfa6312382a5429bcc (patch)
treef7ddfa33ef532e887b3028fd5259b2ce5e26188e /drivers/infiniband/hw/mthca/mthca_cq.c
parentd9b98b0f11ee7dd39429001ba289f095b9d66917 (diff)
IB/mthca: Get rid of might_sleep() annotations
The might_sleep() annotations in mthca are silly -- they all occur shortly before calls that will end up in core functions like kmalloc() that will print the same warning in an unsafe context anyway. In fact, beyond cluttering the source, we're actually bloating text with CONFIG_DEBUG_SPINLOCK_SLEEP and/or CONFIG_PREEMPT_VOLUNTARY set. With both options set, getting rid of the might_sleep()s saves a lot: add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-171 (-171) function old new delta mthca_pd_alloc 132 109 -23 mthca_init_cq 969 946 -23 mthca_mr_alloc 592 568 -24 mthca_pd_free 67 42 -25 mthca_free_mr 219 194 -25 mthca_free_cq 570 545 -25 mthca_fmr_alloc 742 716 -26 Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_cq.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cq.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c
index 16a851b341f8..78d9cc119f33 100644
--- a/drivers/infiniband/hw/mthca/mthca_cq.c
+++ b/drivers/infiniband/hw/mthca/mthca_cq.c
@@ -696,8 +696,6 @@ int mthca_init_cq(struct mthca_dev *dev, int nent,
696 u8 status; 696 u8 status;
697 int i; 697 int i;
698 698
699 might_sleep();
700
701 cq->ibcq.cqe = nent - 1; 699 cq->ibcq.cqe = nent - 1;
702 cq->is_kernel = !ctx; 700 cq->is_kernel = !ctx;
703 701
@@ -827,8 +825,6 @@ void mthca_free_cq(struct mthca_dev *dev,
827 int err; 825 int err;
828 u8 status; 826 u8 status;
829 827
830 might_sleep();
831
832 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); 828 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL);
833 if (IS_ERR(mailbox)) { 829 if (IS_ERR(mailbox)) {
834 mthca_warn(dev, "No memory for mailbox to free CQ.\n"); 830 mthca_warn(dev, "No memory for mailbox to free CQ.\n");