struct mlx4_uar priv_uar;
u32 priv_pdn;
- MLX4_DECLARE_DOORBELL_LOCK(uar_lock);
struct ib_mad_agent *send_agent[MLX4_MAX_PORTS][2];
struct ib_ah *sm_ah[MLX4_MAX_PORTS];
spinlock_t sm_lock;
struct mutex cap_mask_mutex;
+
+#ifndef _WIN64
+ spinlock_t uar_lock;
+#endif
};
static inline struct mlx4_ib_dev *to_mdev(struct ib_device *ibdev)
#define MLX4_SEND_DOORBELL 0x14
#define MLX4_CQ_DOORBELL 0x20
-#if BITS_PER_LONG == 64
+#if _WIN64
/*
* Assume that we can just write a 64-bit doorbell atomically. s390
* actually doesn't have writeq() but S/390 systems don't even have
*/
#define MLX4_DECLARE_DOORBELL_LOCK(name)
-#define MLX4_INIT_DOORBELL_LOCK(ptr) do { } while (0)
+#define MLX4_INIT_DOORBELL_LOCK(ptr)
#define MLX4_GET_DOORBELL_LOCK(ptr) (NULL)
static inline void mlx4_write64(__be32 val[2], void __iomem *dest,
spinlock_t *doorbell_lock)
{
- __raw_writeq(*(u64 *) val, dest);
+ UNREFERENCED_PARAMETER(doorbell_lock);
+ *(volatile u64 *)dest = *(volatile u64 *)val;
}
#else
-
/*
* Just fall back to a spinlock to protect the doorbell if
* BITS_PER_LONG is 32 -- there's no portable way to do atomic 64-bit