1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef DMAENGINE_H
22#define DMAENGINE_H
23
24#include <linux/device.h>
25#include <linux/uio.h>
26#include <linux/scatterlist.h>
27#include <linux/bitmap.h>
28#include <asm/page.h>
29
30
31
32
33
34
35typedef s32 dma_cookie_t;
36#define DMA_MIN_COOKIE 1
37#define DMA_MAX_COOKIE INT_MAX
38
39#define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0)
40
41
42
43
44
45
46
47
48enum dma_status {
49 DMA_SUCCESS,
50 DMA_IN_PROGRESS,
51 DMA_PAUSED,
52 DMA_ERROR,
53};
54
55
56
57
58
59
60
61enum dma_transaction_type {
62 DMA_MEMCPY,
63 DMA_XOR,
64 DMA_PQ,
65 DMA_XOR_VAL,
66 DMA_PQ_VAL,
67 DMA_MEMSET,
68 DMA_INTERRUPT,
69 DMA_SG,
70 DMA_PRIVATE,
71 DMA_ASYNC_TX,
72 DMA_SLAVE,
73 DMA_CYCLIC,
74 DMA_INTERLEAVE,
75
76 DMA_TX_TYPE_END,
77};
78
79
80
81
82
83
84
85
86enum dma_transfer_direction {
87 DMA_MEM_TO_MEM,
88 DMA_MEM_TO_DEV,
89 DMA_DEV_TO_MEM,
90 DMA_DEV_TO_DEV,
91 DMA_TRANS_NONE,
92};
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126struct data_chunk {
127 size_t size;
128 size_t icg;
129};
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149struct dma_interleaved_template {
150 dma_addr_t src_start;
151 dma_addr_t dst_start;
152 enum dma_transfer_direction dir;
153 bool src_inc;
154 bool dst_inc;
155 bool src_sgl;
156 bool dst_sgl;
157 size_t numf;
158 size_t frame_size;
159 struct data_chunk sgl[0];
160};
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184enum dma_ctrl_flags {
185 DMA_PREP_INTERRUPT = (1 << 0),
186 DMA_CTRL_ACK = (1 << 1),
187 DMA_COMPL_SKIP_SRC_UNMAP = (1 << 2),
188 DMA_COMPL_SKIP_DEST_UNMAP = (1 << 3),
189 DMA_COMPL_SRC_UNMAP_SINGLE = (1 << 4),
190 DMA_COMPL_DEST_UNMAP_SINGLE = (1 << 5),
191 DMA_PREP_PQ_DISABLE_P = (1 << 6),
192 DMA_PREP_PQ_DISABLE_Q = (1 << 7),
193 DMA_PREP_CONTINUE = (1 << 8),
194 DMA_PREP_FENCE = (1 << 9),
195};
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211enum dma_ctrl_cmd {
212 DMA_TERMINATE_ALL,
213 DMA_PAUSE,
214 DMA_RESUME,
215 DMA_SLAVE_CONFIG,
216 FSLDMA_EXTERNAL_START,
217};
218
219
220
221
222enum sum_check_bits {
223 SUM_CHECK_P = 0,
224 SUM_CHECK_Q = 1,
225};
226
227
228
229
230
231
232enum sum_check_flags {
233 SUM_CHECK_P_RESULT = (1 << SUM_CHECK_P),
234 SUM_CHECK_Q_RESULT = (1 << SUM_CHECK_Q),
235};
236
237
238
239
240
241
242typedef struct { DECLARE_BITMAP(bits, DMA_TX_TYPE_END); } dma_cap_mask_t;
243
244
245
246
247
248
249
250struct dma_chan_percpu {
251
252 unsigned long memcpy_count;
253 unsigned long bytes_transferred;
254};
255
256
257
258
259
260
261
262
263
264
265
266
267
268struct dma_chan {
269 struct dma_device *device;
270 dma_cookie_t cookie;
271
272
273 int chan_id;
274 struct dma_chan_dev *dev;
275
276 struct list_head device_node;
277 struct dma_chan_percpu __percpu *local;
278 int client_count;
279 int table_count;
280 void *private;
281};
282
283
284
285
286
287
288
289
290struct dma_chan_dev {
291 struct dma_chan *chan;
292 struct device device;
293 int dev_id;
294 atomic_t *idr_ref;
295};
296
297
298
299
300
301enum dma_slave_buswidth {
302 DMA_SLAVE_BUSWIDTH_UNDEFINED = 0,
303 DMA_SLAVE_BUSWIDTH_1_BYTE = 1,
304 DMA_SLAVE_BUSWIDTH_2_BYTES = 2,
305 DMA_SLAVE_BUSWIDTH_4_BYTES = 4,
306 DMA_SLAVE_BUSWIDTH_8_BYTES = 8,
307};
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352struct dma_slave_config {
353 enum dma_transfer_direction direction;
354 dma_addr_t src_addr;
355 dma_addr_t dst_addr;
356 enum dma_slave_buswidth src_addr_width;
357 enum dma_slave_buswidth dst_addr_width;
358 u32 src_maxburst;
359 u32 dst_maxburst;
360};
361
362static inline const char *dma_chan_name(struct dma_chan *chan)
363{
364 return dev_name(&chan->dev->device);
365}
366
367void dma_chan_cleanup(struct kref *kref);
368
369
370
371
372
373
374
375
376
377
378
379
380typedef bool (*dma_filter_fn)(struct dma_chan *chan, void *filter_param);
381
382typedef void (*dma_async_tx_callback)(void *dma_async_param);
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400struct dma_async_tx_descriptor {
401 dma_cookie_t cookie;
402 enum dma_ctrl_flags flags;
403 dma_addr_t phys;
404 struct dma_chan *chan;
405 dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
406 dma_async_tx_callback callback;
407 void *callback_param;
408#ifdef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH
409 struct dma_async_tx_descriptor *next;
410 struct dma_async_tx_descriptor *parent;
411 spinlock_t lock;
412#endif
413};
414
415#ifndef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH
416static inline void txd_lock(struct dma_async_tx_descriptor *txd)
417{
418}
419static inline void txd_unlock(struct dma_async_tx_descriptor *txd)
420{
421}
422static inline void txd_chain(struct dma_async_tx_descriptor *txd, struct dma_async_tx_descriptor *next)
423{
424 BUG();
425}
426static inline void txd_clear_parent(struct dma_async_tx_descriptor *txd)
427{
428}
429static inline void txd_clear_next(struct dma_async_tx_descriptor *txd)
430{
431}
432static inline struct dma_async_tx_descriptor *txd_next(struct dma_async_tx_descriptor *txd)
433{
434 return NULL;
435}
436static inline struct dma_async_tx_descriptor *txd_parent(struct dma_async_tx_descriptor *txd)
437{
438 return NULL;
439}
440
441#else
442static inline void txd_lock(struct dma_async_tx_descriptor *txd)
443{
444 spin_lock_bh(&txd->lock);
445}
446static inline void txd_unlock(struct dma_async_tx_descriptor *txd)
447{
448 spin_unlock_bh(&txd->lock);
449}
450static inline void txd_chain(struct dma_async_tx_descriptor *txd, struct dma_async_tx_descriptor *next)
451{
452 txd->next = next;
453 next->parent = txd;
454}
455static inline void txd_clear_parent(struct dma_async_tx_descriptor *txd)
456{
457 txd->parent = NULL;
458}
459static inline void txd_clear_next(struct dma_async_tx_descriptor *txd)
460{
461 txd->next = NULL;
462}
463static inline struct dma_async_tx_descriptor *txd_parent(struct dma_async_tx_descriptor *txd)
464{
465 return txd->parent;
466}
467static inline struct dma_async_tx_descriptor *txd_next(struct dma_async_tx_descriptor *txd)
468{
469 return txd->next;
470}
471#endif
472
473
474
475
476
477
478
479
480
481
482struct dma_tx_state {
483 dma_cookie_t last;
484 dma_cookie_t used;
485 u32 residue;
486};
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526struct dma_device {
527
528 unsigned int chancnt;
529 unsigned int privatecnt;
530 struct list_head channels;
531 struct list_head global_node;
532 dma_cap_mask_t cap_mask;
533 unsigned short max_xor;
534 unsigned short max_pq;
535 u8 copy_align;
536 u8 xor_align;
537 u8 pq_align;
538 u8 fill_align;
539 #define DMA_HAS_PQ_CONTINUE (1 << 15)
540
541 int dev_id;
542 struct device *dev;
543
544 int (*device_alloc_chan_resources)(struct dma_chan *chan);
545 void (*device_free_chan_resources)(struct dma_chan *chan);
546
547 struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)(
548 struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
549 size_t len, unsigned long flags);
550 struct dma_async_tx_descriptor *(*device_prep_dma_xor)(
551 struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
552 unsigned int src_cnt, size_t len, unsigned long flags);
553 struct dma_async_tx_descriptor *(*device_prep_dma_xor_val)(
554 struct dma_chan *chan, dma_addr_t *src, unsigned int src_cnt,
555 size_t len, enum sum_check_flags *result, unsigned long flags);
556 struct dma_async_tx_descriptor *(*device_prep_dma_pq)(
557 struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src,
558 unsigned int src_cnt, const unsigned char *scf,
559 size_t len, unsigned long flags);
560 struct dma_async_tx_descriptor *(*device_prep_dma_pq_val)(
561 struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
562 unsigned int src_cnt, const unsigned char *scf, size_t len,
563 enum sum_check_flags *pqres, unsigned long flags);
564 struct dma_async_tx_descriptor *(*device_prep_dma_memset)(
565 struct dma_chan *chan, dma_addr_t dest, int value, size_t len,
566 unsigned long flags);
567 struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)(
568 struct dma_chan *chan, unsigned long flags);
569 struct dma_async_tx_descriptor *(*device_prep_dma_sg)(
570 struct dma_chan *chan,
571 struct scatterlist *dst_sg, unsigned int dst_nents,
572 struct scatterlist *src_sg, unsigned int src_nents,
573 unsigned long flags);
574
575 struct dma_async_tx_descriptor *(*device_prep_slave_sg)(
576 struct dma_chan *chan, struct scatterlist *sgl,
577 unsigned int sg_len, enum dma_transfer_direction direction,
578 unsigned long flags);
579 struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)(
580 struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
581 size_t period_len, enum dma_transfer_direction direction);
582 struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)(
583 struct dma_chan *chan, struct dma_interleaved_template *xt,
584 unsigned long flags);
585 int (*device_control)(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
586 unsigned long arg);
587
588 enum dma_status (*device_tx_status)(struct dma_chan *chan,
589 dma_cookie_t cookie,
590 struct dma_tx_state *txstate);
591 void (*device_issue_pending)(struct dma_chan *chan);
592};
593
594static inline int dmaengine_device_control(struct dma_chan *chan,
595 enum dma_ctrl_cmd cmd,
596 unsigned long arg)
597{
598 return chan->device->device_control(chan, cmd, arg);
599}
600
601static inline int dmaengine_slave_config(struct dma_chan *chan,
602 struct dma_slave_config *config)
603{
604 return dmaengine_device_control(chan, DMA_SLAVE_CONFIG,
605 (unsigned long)config);
606}
607
608static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(
609 struct dma_chan *chan, void *buf, size_t len,
610 enum dma_transfer_direction dir, unsigned long flags)
611{
612 struct scatterlist sg;
613 sg_init_one(&sg, buf, len);
614
615 return chan->device->device_prep_slave_sg(chan, &sg, 1, dir, flags);
616}
617
618static inline int dmaengine_terminate_all(struct dma_chan *chan)
619{
620 return dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0);
621}
622
623static inline int dmaengine_pause(struct dma_chan *chan)
624{
625 return dmaengine_device_control(chan, DMA_PAUSE, 0);
626}
627
628static inline int dmaengine_resume(struct dma_chan *chan)
629{
630 return dmaengine_device_control(chan, DMA_RESUME, 0);
631}
632
633static inline dma_cookie_t dmaengine_submit(struct dma_async_tx_descriptor *desc)
634{
635 return desc->tx_submit(desc);
636}
637
638static inline bool dmaengine_check_align(u8 align, size_t off1, size_t off2, size_t len)
639{
640 size_t mask;
641
642 if (!align)
643 return true;
644 mask = (1 << align) - 1;
645 if (mask & (off1 | off2 | len))
646 return false;
647 return true;
648}
649
650static inline bool is_dma_copy_aligned(struct dma_device *dev, size_t off1,
651 size_t off2, size_t len)
652{
653 return dmaengine_check_align(dev->copy_align, off1, off2, len);
654}
655
656static inline bool is_dma_xor_aligned(struct dma_device *dev, size_t off1,
657 size_t off2, size_t len)
658{
659 return dmaengine_check_align(dev->xor_align, off1, off2, len);
660}
661
662static inline bool is_dma_pq_aligned(struct dma_device *dev, size_t off1,
663 size_t off2, size_t len)
664{
665 return dmaengine_check_align(dev->pq_align, off1, off2, len);
666}
667
668static inline bool is_dma_fill_aligned(struct dma_device *dev, size_t off1,
669 size_t off2, size_t len)
670{
671 return dmaengine_check_align(dev->fill_align, off1, off2, len);
672}
673
674static inline void
675dma_set_maxpq(struct dma_device *dma, int maxpq, int has_pq_continue)
676{
677 dma->max_pq = maxpq;
678 if (has_pq_continue)
679 dma->max_pq |= DMA_HAS_PQ_CONTINUE;
680}
681
682static inline bool dmaf_continue(enum dma_ctrl_flags flags)
683{
684 return (flags & DMA_PREP_CONTINUE) == DMA_PREP_CONTINUE;
685}
686
687static inline bool dmaf_p_disabled_continue(enum dma_ctrl_flags flags)
688{
689 enum dma_ctrl_flags mask = DMA_PREP_CONTINUE | DMA_PREP_PQ_DISABLE_P;
690
691 return (flags & mask) == mask;
692}
693
694static inline bool dma_dev_has_pq_continue(struct dma_device *dma)
695{
696 return (dma->max_pq & DMA_HAS_PQ_CONTINUE) == DMA_HAS_PQ_CONTINUE;
697}
698
699static inline unsigned short dma_dev_to_maxpq(struct dma_device *dma)
700{
701 return dma->max_pq & ~DMA_HAS_PQ_CONTINUE;
702}
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717static inline int dma_maxpq(struct dma_device *dma, enum dma_ctrl_flags flags)
718{
719 if (dma_dev_has_pq_continue(dma) || !dmaf_continue(flags))
720 return dma_dev_to_maxpq(dma);
721 else if (dmaf_p_disabled_continue(flags))
722 return dma_dev_to_maxpq(dma) - 1;
723 else if (dmaf_continue(flags))
724 return dma_dev_to_maxpq(dma) - 3;
725 BUG();
726}
727
728
729
730#ifdef CONFIG_DMA_ENGINE
731void dmaengine_get(void);
732void dmaengine_put(void);
733#else
734static inline void dmaengine_get(void)
735{
736}
737static inline void dmaengine_put(void)
738{
739}
740#endif
741
742#ifdef CONFIG_NET_DMA
743#define net_dmaengine_get() dmaengine_get()
744#define net_dmaengine_put() dmaengine_put()
745#else
746static inline void net_dmaengine_get(void)
747{
748}
749static inline void net_dmaengine_put(void)
750{
751}
752#endif
753
754#ifdef CONFIG_ASYNC_TX_DMA
755#define async_dmaengine_get() dmaengine_get()
756#define async_dmaengine_put() dmaengine_put()
757#ifndef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH
758#define async_dma_find_channel(type) dma_find_channel(DMA_ASYNC_TX)
759#else
760#define async_dma_find_channel(type) dma_find_channel(type)
761#endif
762#else
763static inline void async_dmaengine_get(void)
764{
765}
766static inline void async_dmaengine_put(void)
767{
768}
769static inline struct dma_chan *
770async_dma_find_channel(enum dma_transaction_type type)
771{
772 return NULL;
773}
774#endif
775
776dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
777 void *dest, void *src, size_t len);
778dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,
779 struct page *page, unsigned int offset, void *kdata, size_t len);
780dma_cookie_t dma_async_memcpy_pg_to_pg(struct dma_chan *chan,
781 struct page *dest_pg, unsigned int dest_off, struct page *src_pg,
782 unsigned int src_off, size_t len);
783void dma_async_tx_descriptor_init(struct dma_async_tx_descriptor *tx,
784 struct dma_chan *chan);
785
786static inline void async_tx_ack(struct dma_async_tx_descriptor *tx)
787{
788 tx->flags |= DMA_CTRL_ACK;
789}
790
791static inline void async_tx_clear_ack(struct dma_async_tx_descriptor *tx)
792{
793 tx->flags &= ~DMA_CTRL_ACK;
794}
795
796static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx)
797{
798 return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK;
799}
800
801#define first_dma_cap(mask) __first_dma_cap(&(mask))
802static inline int __first_dma_cap(const dma_cap_mask_t *srcp)
803{
804 return min_t(int, DMA_TX_TYPE_END,
805 find_first_bit(srcp->bits, DMA_TX_TYPE_END));
806}
807
808#define next_dma_cap(n, mask) __next_dma_cap((n), &(mask))
809static inline int __next_dma_cap(int n, const dma_cap_mask_t *srcp)
810{
811 return min_t(int, DMA_TX_TYPE_END,
812 find_next_bit(srcp->bits, DMA_TX_TYPE_END, n+1));
813}
814
815#define dma_cap_set(tx, mask) __dma_cap_set((tx), &(mask))
816static inline void
817__dma_cap_set(enum dma_transaction_type tx_type, dma_cap_mask_t *dstp)
818{
819 set_bit(tx_type, dstp->bits);
820}
821
822#define dma_cap_clear(tx, mask) __dma_cap_clear((tx), &(mask))
823static inline void
824__dma_cap_clear(enum dma_transaction_type tx_type, dma_cap_mask_t *dstp)
825{
826 clear_bit(tx_type, dstp->bits);
827}
828
829#define dma_cap_zero(mask) __dma_cap_zero(&(mask))
830static inline void __dma_cap_zero(dma_cap_mask_t *dstp)
831{
832 bitmap_zero(dstp->bits, DMA_TX_TYPE_END);
833}
834
835#define dma_has_cap(tx, mask) __dma_has_cap((tx), &(mask))
836static inline int
837__dma_has_cap(enum dma_transaction_type tx_type, dma_cap_mask_t *srcp)
838{
839 return test_bit(tx_type, srcp->bits);
840}
841
842#define for_each_dma_cap_mask(cap, mask) \
843 for ((cap) = first_dma_cap(mask); \
844 (cap) < DMA_TX_TYPE_END; \
845 (cap) = next_dma_cap((cap), (mask)))
846
847
848
849
850
851
852
853
854static inline void dma_async_issue_pending(struct dma_chan *chan)
855{
856 chan->device->device_issue_pending(chan);
857}
858
859#define dma_async_memcpy_issue_pending(chan) dma_async_issue_pending(chan)
860
861
862
863
864
865
866
867
868
869
870
871
872static inline enum dma_status dma_async_is_tx_complete(struct dma_chan *chan,
873 dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used)
874{
875 struct dma_tx_state state;
876 enum dma_status status;
877
878 status = chan->device->device_tx_status(chan, cookie, &state);
879 if (last)
880 *last = state.last;
881 if (used)
882 *used = state.used;
883 return status;
884}
885
886#define dma_async_memcpy_complete(chan, cookie, last, used)\
887 dma_async_is_tx_complete(chan, cookie, last, used)
888
889
890
891
892
893
894
895
896
897
898static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
899 dma_cookie_t last_complete, dma_cookie_t last_used)
900{
901 if (last_complete <= last_used) {
902 if ((cookie <= last_complete) || (cookie > last_used))
903 return DMA_SUCCESS;
904 } else {
905 if ((cookie <= last_complete) && (cookie > last_used))
906 return DMA_SUCCESS;
907 }
908 return DMA_IN_PROGRESS;
909}
910
911static inline void
912dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used, u32 residue)
913{
914 if (st) {
915 st->last = last;
916 st->used = used;
917 st->residue = residue;
918 }
919}
920
921enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
922#ifdef CONFIG_DMA_ENGINE
923enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
924void dma_issue_pending_all(void);
925struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
926void dma_release_channel(struct dma_chan *chan);
927#else
928static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
929{
930 return DMA_SUCCESS;
931}
932static inline void dma_issue_pending_all(void)
933{
934}
935static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask,
936 dma_filter_fn fn, void *fn_param)
937{
938 return NULL;
939}
940static inline void dma_release_channel(struct dma_chan *chan)
941{
942}
943#endif
944
945
946
947int dma_async_device_register(struct dma_device *device);
948void dma_async_device_unregister(struct dma_device *device);
949void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
950struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
951#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
952
953
954
955struct dma_page_list {
956 char __user *base_address;
957 int nr_pages;
958 struct page **pages;
959};
960
961struct dma_pinned_list {
962 int nr_iovecs;
963 struct dma_page_list page_list[0];
964};
965
966struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len);
967void dma_unpin_iovec_pages(struct dma_pinned_list* pinned_list);
968
969dma_cookie_t dma_memcpy_to_iovec(struct dma_chan *chan, struct iovec *iov,
970 struct dma_pinned_list *pinned_list, unsigned char *kdata, size_t len);
971dma_cookie_t dma_memcpy_pg_to_iovec(struct dma_chan *chan, struct iovec *iov,
972 struct dma_pinned_list *pinned_list, struct page *page,
973 unsigned int offset, size_t len);
974
975#endif
976