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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michael S. Tsirkin <[email protected]>

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 <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 25-akpm/drivers/infiniband/hw/mthca/mthca_doorbell.h |   11 +++++++++++
 1 files changed, 11 insertions(+)

diff -puN drivers/infiniband/hw/mthca/mthca_doorbell.h~ib-mthca-add-mthca_write64_raw-for-writing-to-mtt-table-directly drivers/infiniband/hw/mthca/mthca_doorbell.h
--- 25/drivers/infiniband/hw/mthca/mthca_doorbell.h~ib-mthca-add-mthca_write64_raw-for-writing-to-mtt-table-directly	2005-04-12 03:21:46.492069032 -0700
+++ 25-akpm/drivers/infiniband/hw/mthca/mthca_doorbell.h	2005-04-12 03:21:46.495068576 -0700
@@ -51,6 +51,11 @@
 #define MTHCA_INIT_DOORBELL_LOCK(ptr)    do { } while (0)
 #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,
 				 spinlock_t *doorbell_lock)
 {
@@ -74,6 +79,12 @@ static inline void mthca_write_db_rec(u3
 #define MTHCA_INIT_DOORBELL_LOCK(ptr)     spin_lock_init(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,
 				 spinlock_t *doorbell_lock)
 {
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux