summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_dev.h
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-01-30 16:45:11 -0800
committerRoland Dreier <rolandd@cisco.com>2006-01-30 16:45:11 -0800
commitfd9cfdd11be3b37b5c919b64b43990f14a1587bd (patch)
tree6d36c5927fcf17c98bfc38dccbde90925279c544 /drivers/infiniband/hw/mthca/mthca_dev.h
parente3aa31c517cb6fd0a3d8b23e6a7e71a6aafc2393 (diff)
downloadop-kernel-dev-fd9cfdd11be3b37b5c919b64b43990f14a1587bd.zip
op-kernel-dev-fd9cfdd11be3b37b5c919b64b43990f14a1587bd.tar.gz
IB/mthca: Semaphore to mutex conversions
Convert semaphores to mutexes in mthca. Leave firmware command interface poll_sem and event_sem as semaphores. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_dev.h')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_dev.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h
index a104ab0..2a165fd 100644
--- a/drivers/infiniband/hw/mthca/mthca_dev.h
+++ b/drivers/infiniband/hw/mthca/mthca_dev.h
@@ -44,6 +44,8 @@
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/timer.h>
+#include <linux/mutex.h>
+
#include <asm/semaphore.h>
#include "mthca_provider.h"
@@ -111,7 +113,7 @@ enum {
struct mthca_cmd {
struct pci_pool *pool;
int use_events;
- struct semaphore hcr_sem;
+ struct mutex hcr_mutex;
struct semaphore poll_sem;
struct semaphore event_sem;
int max_cmds;
@@ -256,7 +258,7 @@ struct mthca_av_table {
};
struct mthca_mcg_table {
- struct semaphore sem;
+ struct mutex mutex;
struct mthca_alloc alloc;
struct mthca_icm_table *table;
};
@@ -301,7 +303,7 @@ struct mthca_dev {
u64 ddr_end;
MTHCA_DECLARE_DOORBELL_LOCK(doorbell_lock)
- struct semaphore cap_mask_mutex;
+ struct mutex cap_mask_mutex;
void __iomem *hcr;
void __iomem *kar;
OpenPOWER on IntegriCloud