diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2005-04-16 18:26:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:26:27 -0400 |
commit | ef416a33acbd2d68a58ea1ffdc13c674e53bc78f (patch) | |
tree | 4029b8cd92b9e8a24a313f07230aa5bda51a746c /drivers/infiniband | |
parent | 9095e208d84c349193fa19245cd5a8bc1a9774b8 (diff) |
[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: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_doorbell.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_doorbell.h b/drivers/infiniband/hw/mthca/mthca_doorbell.h index 78b183cab54c..821039a49049 100644 --- a/drivers/infiniband/hw/mthca/mthca_doorbell.h +++ b/drivers/infiniband/hw/mthca/mthca_doorbell.h | |||
@@ -51,6 +51,11 @@ | |||
51 | #define MTHCA_INIT_DOORBELL_LOCK(ptr) do { } while (0) | 51 | #define MTHCA_INIT_DOORBELL_LOCK(ptr) do { } while (0) |
52 | #define MTHCA_GET_DOORBELL_LOCK(ptr) (NULL) | 52 | #define MTHCA_GET_DOORBELL_LOCK(ptr) (NULL) |
53 | 53 | ||
54 | static inline void mthca_write64_raw(__be64 val, void __iomem *dest) | ||
55 | { | ||
56 | __raw_writeq((__force u64) val, dest); | ||
57 | } | ||
58 | |||
54 | static inline void mthca_write64(u32 val[2], void __iomem *dest, | 59 | static inline void mthca_write64(u32 val[2], void __iomem *dest, |
55 | spinlock_t *doorbell_lock) | 60 | spinlock_t *doorbell_lock) |
56 | { | 61 | { |
@@ -74,6 +79,12 @@ static inline void mthca_write_db_rec(u32 val[2], u32 *db) | |||
74 | #define MTHCA_INIT_DOORBELL_LOCK(ptr) spin_lock_init(ptr) | 79 | #define MTHCA_INIT_DOORBELL_LOCK(ptr) spin_lock_init(ptr) |
75 | #define MTHCA_GET_DOORBELL_LOCK(ptr) (ptr) | 80 | #define MTHCA_GET_DOORBELL_LOCK(ptr) (ptr) |
76 | 81 | ||
82 | static inline void mthca_write64_raw(__be64 val, void __iomem *dest) | ||
83 | { | ||
84 | __raw_writel(((__force u32 *) &val)[0], dest); | ||
85 | __raw_writel(((__force u32 *) &val)[1], dest + 4); | ||
86 | } | ||
87 | |||
77 | static inline void mthca_write64(u32 val[2], void __iomem *dest, | 88 | static inline void mthca_write64(u32 val[2], void __iomem *dest, |
78 | spinlock_t *doorbell_lock) | 89 | spinlock_t *doorbell_lock) |
79 | { | 90 | { |