Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git] / drivers / infiniband / hw / mthca / mthca_doorbell.h
index dd9a44d..14f51ef 100644 (file)
@@ -30,8 +30,6 @@
  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
- *
- * $Id: mthca_doorbell.h 1349 2004-12-16 21:09:43Z roland $
  */
 
 #include <linux/types.h>
@@ -58,10 +56,10 @@ static inline void mthca_write64_raw(__be64 val, void __iomem *dest)
        __raw_writeq((__force u64) val, dest);
 }
 
-static inline void mthca_write64(__be32 val[2], void __iomem *dest,
+static inline void mthca_write64(u32 hi, u32 lo, void __iomem *dest,
                                 spinlock_t *doorbell_lock)
 {
-       __raw_writeq(*(u64 *) val, dest);
+       __raw_writeq((__force u64) cpu_to_be64((u64) hi << 32 | lo), dest);
 }
 
 static inline void mthca_write_db_rec(__be32 val[2], __be32 *db)
@@ -87,14 +85,17 @@ static inline void mthca_write64_raw(__be64 val, void __iomem *dest)
        __raw_writel(((__force u32 *) &val)[1], dest + 4);
 }
 
-static inline void mthca_write64(__be32 val[2], void __iomem *dest,
+static inline void mthca_write64(u32 hi, u32 lo, void __iomem *dest,
                                 spinlock_t *doorbell_lock)
 {
        unsigned long flags;
 
+       hi = (__force u32) cpu_to_be32(hi);
+       lo = (__force u32) cpu_to_be32(lo);
+
        spin_lock_irqsave(doorbell_lock, flags);
-       __raw_writel((__force u32) val[0], dest);
-       __raw_writel((__force u32) val[1], dest + 4);
+       __raw_writel(hi, dest);
+       __raw_writel(lo, dest + 4);
        spin_unlock_irqrestore(doorbell_lock, flags);
 }