Commit d43dbacf authored by Bart Van Assche's avatar Bart Van Assche Committed by Doug Ledford

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: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 69324c20
...@@ -3172,19 +3172,18 @@ static inline void ib_dma_sync_single_for_device(struct ib_device *dev, ...@@ -3172,19 +3172,18 @@ static inline void ib_dma_sync_single_for_device(struct ib_device *dev,
*/ */
static inline void *ib_dma_alloc_coherent(struct ib_device *dev, static inline void *ib_dma_alloc_coherent(struct ib_device *dev,
size_t size, size_t size,
u64 *dma_handle, dma_addr_t *dma_handle,
gfp_t flag) gfp_t flag)
{ {
if (dev->dma_ops) if (dev->dma_ops) {
return dev->dma_ops->alloc_coherent(dev, size, dma_handle, flag); u64 handle;
else {
dma_addr_t handle;
void *ret; void *ret;
ret = dma_alloc_coherent(dev->dma_device, size, &handle, flag); ret = dev->dma_ops->alloc_coherent(dev, size, &handle, flag);
*dma_handle = handle; *dma_handle = handle;
return ret; return ret;
} }
return dma_alloc_coherent(dev->dma_device, size, dma_handle, flag);
} }
/** /**
...@@ -3196,7 +3195,7 @@ static inline void *ib_dma_alloc_coherent(struct ib_device *dev, ...@@ -3196,7 +3195,7 @@ static inline void *ib_dma_alloc_coherent(struct ib_device *dev,
*/ */
static inline void ib_dma_free_coherent(struct ib_device *dev, static inline void ib_dma_free_coherent(struct ib_device *dev,
size_t size, void *cpu_addr, size_t size, void *cpu_addr,
u64 dma_handle) dma_addr_t dma_handle)
{ {
if (dev->dma_ops) if (dev->dma_ops)
dev->dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); dev->dma_ops->free_coherent(dev, size, cpu_addr, dma_handle);
......
...@@ -134,7 +134,7 @@ struct rds_ib_connection { ...@@ -134,7 +134,7 @@ struct rds_ib_connection {
struct rds_ib_work_ring i_send_ring; struct rds_ib_work_ring i_send_ring;
struct rm_data_op *i_data_op; struct rm_data_op *i_data_op;
struct rds_header *i_send_hdrs; struct rds_header *i_send_hdrs;
u64 i_send_hdrs_dma; dma_addr_t i_send_hdrs_dma;
struct rds_ib_send_work *i_sends; struct rds_ib_send_work *i_sends;
atomic_t i_signaled_sends; atomic_t i_signaled_sends;
...@@ -144,7 +144,7 @@ struct rds_ib_connection { ...@@ -144,7 +144,7 @@ struct rds_ib_connection {
struct rds_ib_incoming *i_ibinc; struct rds_ib_incoming *i_ibinc;
u32 i_recv_data_rem; u32 i_recv_data_rem;
struct rds_header *i_recv_hdrs; struct rds_header *i_recv_hdrs;
u64 i_recv_hdrs_dma; dma_addr_t i_recv_hdrs_dma;
struct rds_ib_recv_work *i_recvs; struct rds_ib_recv_work *i_recvs;
u64 i_ack_recv; /* last ACK received */ u64 i_ack_recv; /* last ACK received */
struct rds_ib_refill_cache i_cache_incs; struct rds_ib_refill_cache i_cache_incs;
...@@ -161,7 +161,7 @@ struct rds_ib_connection { ...@@ -161,7 +161,7 @@ struct rds_ib_connection {
struct rds_header *i_ack; struct rds_header *i_ack;
struct ib_send_wr i_ack_wr; struct ib_send_wr i_ack_wr;
struct ib_sge i_ack_sge; struct ib_sge i_ack_sge;
u64 i_ack_dma; dma_addr_t i_ack_dma;
unsigned long i_ack_queued; unsigned long i_ack_queued;
/* Flow control related information /* Flow control related information
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment