aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dmaengine.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-02-02 21:49:57 -0500
committerDan Williams <dan.j.williams@intel.com>2008-02-06 12:12:17 -0500
commit0036731c88fdb5bf4f04a796a30b5e445fc57f54 (patch)
tree66982e4a9fdb92fedadca35c0ccaa0b9a75e9d2e /include/linux/dmaengine.h
parentd909b347591a23c5a2c324fbccd4c9c966f31c67 (diff)
async_tx: kill tx_set_src and tx_set_dest methods
The tx_set_src and tx_set_dest methods were originally implemented to allow an array of addresses to be passed down from async_xor to the dmaengine driver while minimizing stack overhead. Removing these methods allows drivers to have all transaction parameters available at 'prep' time, saves two function pointers in struct dma_async_tx_descriptor, and reduces the number of indirect branches.. A consequence of moving this data to the 'prep' routine is that multi-source routines like async_xor need temporary storage to convert an array of linear addresses into an array of dma addresses. In order to keep the same stack footprint of the previous implementation the input array is reused as storage for the dma addresses. This requires that sizeof(dma_addr_t) be less than or equal to sizeof(void *). As a consequence CONFIG_DMADEVICES now depends on !CONFIG_HIGHMEM64G. It also requires that drivers be able to make descriptor resources available when the 'prep' routine is polled. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r--include/linux/dmaengine.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 5c84bf897593..b0864f5b729d 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -209,8 +209,6 @@ typedef void (*dma_async_tx_callback)(void *dma_async_param);
209 * descriptors 209 * descriptors
210 * @chan: target channel for this operation 210 * @chan: target channel for this operation
211 * @tx_submit: set the prepared descriptor(s) to be executed by the engine 211 * @tx_submit: set the prepared descriptor(s) to be executed by the engine
212 * @tx_set_dest: set a destination address in a hardware descriptor
213 * @tx_set_src: set a source address in a hardware descriptor
214 * @callback: routine to call after this operation is complete 212 * @callback: routine to call after this operation is complete
215 * @callback_param: general parameter to pass to the callback routine 213 * @callback_param: general parameter to pass to the callback routine
216 * ---async_tx api specific fields--- 214 * ---async_tx api specific fields---
@@ -227,10 +225,6 @@ struct dma_async_tx_descriptor {
227 struct list_head tx_list; 225 struct list_head tx_list;
228 struct dma_chan *chan; 226 struct dma_chan *chan;
229 dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); 227 dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
230 void (*tx_set_dest)(dma_addr_t addr,
231 struct dma_async_tx_descriptor *tx, int index);
232 void (*tx_set_src)(dma_addr_t addr,
233 struct dma_async_tx_descriptor *tx, int index);
234 dma_async_tx_callback callback; 228 dma_async_tx_callback callback;
235 void *callback_param; 229 void *callback_param;
236 struct list_head depend_list; 230 struct list_head depend_list;
@@ -279,15 +273,17 @@ struct dma_device {
279 void (*device_free_chan_resources)(struct dma_chan *chan); 273 void (*device_free_chan_resources)(struct dma_chan *chan);
280 274
281 struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)( 275 struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)(
282 struct dma_chan *chan, size_t len, int int_en); 276 struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
277 size_t len, int int_en);
283 struct dma_async_tx_descriptor *(*device_prep_dma_xor)( 278 struct dma_async_tx_descriptor *(*device_prep_dma_xor)(
284 struct dma_chan *chan, unsigned int src_cnt, size_t len, 279 struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
285 int int_en); 280 unsigned int src_cnt, size_t len, int int_en);
286 struct dma_async_tx_descriptor *(*device_prep_dma_zero_sum)( 281 struct dma_async_tx_descriptor *(*device_prep_dma_zero_sum)(
287 struct dma_chan *chan, unsigned int src_cnt, size_t len, 282 struct dma_chan *chan, dma_addr_t *src, unsigned int src_cnt,
288 u32 *result, int int_en); 283 size_t len, u32 *result, int int_en);
289 struct dma_async_tx_descriptor *(*device_prep_dma_memset)( 284 struct dma_async_tx_descriptor *(*device_prep_dma_memset)(
290 struct dma_chan *chan, int value, size_t len, int int_en); 285 struct dma_chan *chan, dma_addr_t dest, int value, size_t len,
286 int int_en);
291 struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)( 287 struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)(
292 struct dma_chan *chan); 288 struct dma_chan *chan);
293 289