Commit ef416a33 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Linus Torvalds

[PATCH] IB/mthca: add mthca_write64_raw() for writing to MTT table directly

Add mthca_write64_raw() function, which will be used to write FMR entries that
are in ioremapped PCI memory.
Signed-off-by: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9095e208
...@@ -51,6 +51,11 @@ ...@@ -51,6 +51,11 @@
#define MTHCA_INIT_DOORBELL_LOCK(ptr) do { } while (0) #define MTHCA_INIT_DOORBELL_LOCK(ptr) do { } while (0)
#define MTHCA_GET_DOORBELL_LOCK(ptr) (NULL) #define MTHCA_GET_DOORBELL_LOCK(ptr) (NULL)
static inline void mthca_write64_raw(__be64 val, void __iomem *dest)
{
__raw_writeq((__force u64) val, dest);
}
static inline void mthca_write64(u32 val[2], void __iomem *dest, static inline void mthca_write64(u32 val[2], void __iomem *dest,
spinlock_t *doorbell_lock) spinlock_t *doorbell_lock)
{ {
...@@ -74,6 +79,12 @@ static inline void mthca_write_db_rec(u32 val[2], u32 *db) ...@@ -74,6 +79,12 @@ static inline void mthca_write_db_rec(u32 val[2], u32 *db)
#define MTHCA_INIT_DOORBELL_LOCK(ptr) spin_lock_init(ptr) #define MTHCA_INIT_DOORBELL_LOCK(ptr) spin_lock_init(ptr)
#define MTHCA_GET_DOORBELL_LOCK(ptr) (ptr) #define MTHCA_GET_DOORBELL_LOCK(ptr) (ptr)
static inline void mthca_write64_raw(__be64 val, void __iomem *dest)
{
__raw_writel(((__force u32 *) &val)[0], dest);
__raw_writel(((__force u32 *) &val)[1], dest + 4);
}
static inline void mthca_write64(u32 val[2], void __iomem *dest, static inline void mthca_write64(u32 val[2], void __iomem *dest,
spinlock_t *doorbell_lock) spinlock_t *doorbell_lock)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment