aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2017-01-20 16:04:10 -0500
committerDoug Ledford <dledford@redhat.com>2017-01-24 12:23:35 -0500
commitd43dbacfc06349309a99e50c575d86bc36ca4178 (patch)
treea238000ae26b6a3a054587307421795863635ce7
parent69324c2015e9ba852f1d66a8150d1a871cc62922 (diff)
IB/core: Change the type of an ib_dma_alloc_coherent() argument
Change the type of the dma_handle argument from u64 * to dma_addr_t *. This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--include/rdma/ib_verbs.h13
-rw-r--r--net/rds/ib.h6
2 files changed, 9 insertions, 10 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index c2f2f54dbd49..694e39e4f1ff 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -3172,19 +3172,18 @@ static inline void ib_dma_sync_single_for_device(struct ib_device *dev,
3172 */ 3172 */
3173static inline void *ib_dma_alloc_coherent(struct ib_device *dev, 3173static inline void *ib_dma_alloc_coherent(struct ib_device *dev,
3174 size_t size, 3174 size_t size,
3175 u64 *dma_handle, 3175 dma_addr_t *dma_handle,
3176 gfp_t flag) 3176 gfp_t flag)
3177{ 3177{
3178 if (dev->dma_ops) 3178 if (dev->dma_ops) {
3179 return dev->dma_ops->alloc_coherent(dev, size, dma_handle, flag); 3179 u64 handle;
3180 else {
3181 dma_addr_t handle;
3182 void *ret; 3180 void *ret;
3183 3181
3184 ret = dma_alloc_coherent(dev->dma_device, size, &handle, flag); 3182 ret = dev->dma_ops->alloc_coherent(dev, size, &handle, flag);
3185 *dma_handle = handle; 3183 *dma_handle = handle;
3186 return ret; 3184 return ret;
3187 } 3185 }
3186 return dma_alloc_coherent(dev->dma_device, size, dma_handle, flag);
3188} 3187}
3189 3188
3190/** 3189/**
@@ -3196,7 +3195,7 @@ static inline void *ib_dma_alloc_coherent(struct ib_device *dev,
3196 */ 3195 */
3197static inline void ib_dma_free_coherent(struct ib_device *dev, 3196static inline void ib_dma_free_coherent(struct ib_device *dev,
3198 size_t size, void *cpu_addr, 3197 size_t size, void *cpu_addr,
3199 u64 dma_handle) 3198 dma_addr_t dma_handle)
3200{ 3199{
3201 if (dev->dma_ops) 3200 if (dev->dma_ops)
3202 dev->dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); 3201 dev->dma_ops->free_coherent(dev, size, cpu_addr, dma_handle);
diff --git a/net/rds/ib.h b/net/rds/ib.h
index 45ac8e8e58f4..d21ca88ab628 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -134,7 +134,7 @@ struct rds_ib_connection {
134 struct rds_ib_work_ring i_send_ring; 134 struct rds_ib_work_ring i_send_ring;
135 struct rm_data_op *i_data_op; 135 struct rm_data_op *i_data_op;
136 struct rds_header *i_send_hdrs; 136 struct rds_header *i_send_hdrs;
137 u64 i_send_hdrs_dma; 137 dma_addr_t i_send_hdrs_dma;
138 struct rds_ib_send_work *i_sends; 138 struct rds_ib_send_work *i_sends;
139 atomic_t i_signaled_sends; 139 atomic_t i_signaled_sends;
140 140
@@ -144,7 +144,7 @@ struct rds_ib_connection {
144 struct rds_ib_incoming *i_ibinc; 144 struct rds_ib_incoming *i_ibinc;
145 u32 i_recv_data_rem; 145 u32 i_recv_data_rem;
146 struct rds_header *i_recv_hdrs; 146 struct rds_header *i_recv_hdrs;
147 u64 i_recv_hdrs_dma; 147 dma_addr_t i_recv_hdrs_dma;
148 struct rds_ib_recv_work *i_recvs; 148 struct rds_ib_recv_work *i_recvs;
149 u64 i_ack_recv; /* last ACK received */ 149 u64 i_ack_recv; /* last ACK received */
150 struct rds_ib_refill_cache i_cache_incs; 150 struct rds_ib_refill_cache i_cache_incs;
@@ -161,7 +161,7 @@ struct rds_ib_connection {
161 struct rds_header *i_ack; 161 struct rds_header *i_ack;
162 struct ib_send_wr i_ack_wr; 162 struct ib_send_wr i_ack_wr;
163 struct ib_sge i_ack_sge; 163 struct ib_sge i_ack_sge;
164 u64 i_ack_dma; 164 dma_addr_t i_ack_dma;
165 unsigned long i_ack_queued; 165 unsigned long i_ack_queued;
166 166
167 /* Flow control related information 167 /* Flow control related information