aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_allocator.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-08-31IB/mthca: Use IRQ safe locks to protect allocation bitmapsRoland Dreier1-4/+11
It is supposed to be OK to call mthca_create_ah() and mthca_destroy_ah() from any context. However, for mem-full HCAs, these functions use the mthca_alloc() and mthca_free() bitmap helpers, and those helpers use non-IRQ-safe spin_lock() internally. Lockdep correctly warns that this could lead to a deadlock. Fix this by changing mthca_alloc() and mthca_free() to use spin_lock_irqsave(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-08-03IB/mthca: Clean up mthca array index maskRoland Dreier1-8/+7
Define a constant MTHCA_ARRAY_MASK to replace repeated uses of (PAGE_SIZE / sizeof (void *) - 1) in mthca array code. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-08-03IB/mthca: Fix mthca_array_clear() thinkoMichael S. Tsirkin1-1/+3
mthca_array_clear() does not clear the slot if the used count is positive. This leads to crashes in mthca_qp_event() since that uses mthca_array_get() to check that the qp is valid. Discovered by Ali Ayoub. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2005-08-26[PATCH] IB/mthca: Factor out common queue alloc codeRoland Dreier1-0/+116
Clean up the allocation of memory for queues by factoring out the common code into mthca_buf_alloc() and mthca_buf_free(). Now CQs and QPs share the same queue allocation code, which we'll also use for SRQs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+179
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!