IB/mthca: Use IRQ safe locks to protect allocation bitmaps
authorRoland Dreier <rolandd@cisco.com>
Thu, 31 Aug 2006 23:43:06 +0000 (16:43 -0700)
committerRoland Dreier <rolandd@cisco.com>
Fri, 1 Sep 2006 00:25:56 +0000 (17:25 -0700)
commit5a4e6dccbc0cd1b726820b782daebf887dcb95e9
tree28750ce9e633081f8e814d69a3f3d21fd71359f8
parent22db37ec5fd51b0c77b1dd5751b1cdc2672c08d6
IB/mthca: Use IRQ safe locks to protect allocation bitmaps

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>
drivers/infiniband/hw/mthca/mthca_allocator.c