]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/rds/iw.h
RDS: Use spinlock to protect 64b value update on 32b archs
[linux-2.6-omap-h63xx.git] / net / rds / iw.h
index 70eb948f42f41917cc0649c78950d7785f14293b..b4fb27252895adb45a1cf635ee441741b392cc5d 100644 (file)
@@ -131,7 +131,12 @@ struct rds_iw_connection {
 
        /* sending acks */
        unsigned long           i_ack_flags;
+#ifdef KERNEL_HAS_ATOMIC64
+       atomic64_t              i_ack_next;     /* next ACK to send */
+#else
+       spinlock_t              i_ack_lock;     /* protect i_ack_next */
        u64                     i_ack_next;     /* next ACK to send */
+#endif
        struct rds_header       *i_ack;
        struct ib_send_wr       i_ack_wr;
        struct ib_sge           i_ack_sge;
@@ -391,13 +396,4 @@ rds_iw_data_sge(struct rds_iw_connection *ic, struct ib_sge *sge)
        return &sge[1];
 }
 
-static inline void rds_iw_set_64bit(u64 *ptr, u64 val)
-{
-#if BITS_PER_LONG == 64
-       *ptr = val;
-#else
-       set_64bit(ptr, val);
-#endif
-}
-
 #endif