dmabounce.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. /*
  2. * arch/arm/common/dmabounce.c
  3. *
  4. * Special dma_{map/unmap/dma_sync}_* routines for systems that have
  5. * limited DMA windows. These functions utilize bounce buffers to
  6. * copy data to/from buffers located outside the DMA region. This
  7. * only works for systems in which DMA memory is at the bottom of
  8. * RAM and the remainder of memory is at the top an the DMA memory
  9. * can be marked as ZONE_DMA. Anything beyond that such as discontigous
  10. * DMA windows will require custom implementations that reserve memory
  11. * areas at early bootup.
  12. *
  13. * Original version by Brad Parker (brad@heeltoe.com)
  14. * Re-written by Christopher Hoover <ch@murgatroid.com>
  15. * Made generic by Deepak Saxena <dsaxena@plexity.net>
  16. *
  17. * Copyright (C) 2002 Hewlett Packard Company.
  18. * Copyright (C) 2004 MontaVista Software, Inc.
  19. *
  20. * This program is free software; you can redistribute it and/or
  21. * modify it under the terms of the GNU General Public License
  22. * version 2 as published by the Free Software Foundation.
  23. */
  24. #include <linux/module.h>
  25. #include <linux/init.h>
  26. #include <linux/slab.h>
  27. #include <linux/device.h>
  28. #include <linux/dma-mapping.h>
  29. #include <linux/dmapool.h>
  30. #include <linux/list.h>
  31. #include <asm/cacheflush.h>
  32. #undef DEBUG
  33. #undef STATS
  34. #ifdef STATS
  35. #define DO_STATS(X) do { X ; } while (0)
  36. #else
  37. #define DO_STATS(X) do { } while (0)
  38. #endif
  39. /* ************************************************** */
  40. struct safe_buffer {
  41. struct list_head node;
  42. /* original request */
  43. void *ptr;
  44. size_t size;
  45. int direction;
  46. /* safe buffer info */
  47. struct dma_pool *pool;
  48. void *safe;
  49. dma_addr_t safe_dma_addr;
  50. };
  51. struct dmabounce_device_info {
  52. struct list_head node;
  53. struct device *dev;
  54. struct dma_pool *small_buffer_pool;
  55. struct dma_pool *large_buffer_pool;
  56. struct list_head safe_buffers;
  57. unsigned long small_buffer_size, large_buffer_size;
  58. #ifdef STATS
  59. unsigned long sbp_allocs;
  60. unsigned long lbp_allocs;
  61. unsigned long total_allocs;
  62. unsigned long map_op_count;
  63. unsigned long bounce_count;
  64. #endif
  65. };
  66. static LIST_HEAD(dmabounce_devs);
  67. #ifdef STATS
  68. static void print_alloc_stats(struct dmabounce_device_info *device_info)
  69. {
  70. printk(KERN_INFO
  71. "%s: dmabounce: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n",
  72. device_info->dev->bus_id,
  73. device_info->sbp_allocs, device_info->lbp_allocs,
  74. device_info->total_allocs - device_info->sbp_allocs -
  75. device_info->lbp_allocs,
  76. device_info->total_allocs);
  77. }
  78. #endif
  79. /* find the given device in the dmabounce device list */
  80. static inline struct dmabounce_device_info *
  81. find_dmabounce_dev(struct device *dev)
  82. {
  83. struct list_head *entry;
  84. list_for_each(entry, &dmabounce_devs) {
  85. struct dmabounce_device_info *d =
  86. list_entry(entry, struct dmabounce_device_info, node);
  87. if (d->dev == dev)
  88. return d;
  89. }
  90. return NULL;
  91. }
  92. /* allocate a 'safe' buffer and keep track of it */
  93. static inline struct safe_buffer *
  94. alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
  95. size_t size, enum dma_data_direction dir)
  96. {
  97. struct safe_buffer *buf;
  98. struct dma_pool *pool;
  99. struct device *dev = device_info->dev;
  100. void *safe;
  101. dma_addr_t safe_dma_addr;
  102. dev_dbg(dev, "%s(ptr=%p, size=%d, dir=%d)\n",
  103. __func__, ptr, size, dir);
  104. DO_STATS ( device_info->total_allocs++ );
  105. buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC);
  106. if (buf == NULL) {
  107. dev_warn(dev, "%s: kmalloc failed\n", __func__);
  108. return NULL;
  109. }
  110. if (size <= device_info->small_buffer_size) {
  111. pool = device_info->small_buffer_pool;
  112. safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
  113. DO_STATS ( device_info->sbp_allocs++ );
  114. } else if (size <= device_info->large_buffer_size) {
  115. pool = device_info->large_buffer_pool;
  116. safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
  117. DO_STATS ( device_info->lbp_allocs++ );
  118. } else {
  119. pool = NULL;
  120. safe = dma_alloc_coherent(dev, size, &safe_dma_addr, GFP_ATOMIC);
  121. }
  122. if (safe == NULL) {
  123. dev_warn(device_info->dev,
  124. "%s: could not alloc dma memory (size=%d)\n",
  125. __func__, size);
  126. kfree(buf);
  127. return NULL;
  128. }
  129. #ifdef STATS
  130. if (device_info->total_allocs % 1000 == 0)
  131. print_alloc_stats(device_info);
  132. #endif
  133. buf->ptr = ptr;
  134. buf->size = size;
  135. buf->direction = dir;
  136. buf->pool = pool;
  137. buf->safe = safe;
  138. buf->safe_dma_addr = safe_dma_addr;
  139. list_add(&buf->node, &device_info->safe_buffers);
  140. return buf;
  141. }
  142. /* determine if a buffer is from our "safe" pool */
  143. static inline struct safe_buffer *
  144. find_safe_buffer(struct dmabounce_device_info *device_info, dma_addr_t safe_dma_addr)
  145. {
  146. struct list_head *entry;
  147. list_for_each(entry, &device_info->safe_buffers) {
  148. struct safe_buffer *b =
  149. list_entry(entry, struct safe_buffer, node);
  150. if (b->safe_dma_addr == safe_dma_addr)
  151. return b;
  152. }
  153. return NULL;
  154. }
  155. static inline void
  156. free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer *buf)
  157. {
  158. dev_dbg(device_info->dev, "%s(buf=%p)\n", __func__, buf);
  159. list_del(&buf->node);
  160. if (buf->pool)
  161. dma_pool_free(buf->pool, buf->safe, buf->safe_dma_addr);
  162. else
  163. dma_free_coherent(device_info->dev, buf->size, buf->safe,
  164. buf->safe_dma_addr);
  165. kfree(buf);
  166. }
  167. /* ************************************************** */
  168. #ifdef STATS
  169. static void print_map_stats(struct dmabounce_device_info *device_info)
  170. {
  171. printk(KERN_INFO
  172. "%s: dmabounce: map_op_count=%lu, bounce_count=%lu\n",
  173. device_info->dev->bus_id,
  174. device_info->map_op_count, device_info->bounce_count);
  175. }
  176. #endif
  177. static inline dma_addr_t
  178. map_single(struct device *dev, void *ptr, size_t size,
  179. enum dma_data_direction dir)
  180. {
  181. struct dmabounce_device_info *device_info = find_dmabounce_dev(dev);
  182. dma_addr_t dma_addr;
  183. int needs_bounce = 0;
  184. if (device_info)
  185. DO_STATS ( device_info->map_op_count++ );
  186. dma_addr = virt_to_dma(dev, ptr);
  187. if (dev->dma_mask) {
  188. unsigned long mask = *dev->dma_mask;
  189. unsigned long limit;
  190. limit = (mask + 1) & ~mask;
  191. if (limit && size > limit) {
  192. dev_err(dev, "DMA mapping too big (requested %#x "
  193. "mask %#Lx)\n", size, *dev->dma_mask);
  194. return ~0;
  195. }
  196. /*
  197. * Figure out if we need to bounce from the DMA mask.
  198. */
  199. needs_bounce = (dma_addr | (dma_addr + size - 1)) & ~mask;
  200. }
  201. if (device_info && (needs_bounce || dma_needs_bounce(dev, dma_addr, size))) {
  202. struct safe_buffer *buf;
  203. buf = alloc_safe_buffer(device_info, ptr, size, dir);
  204. if (buf == 0) {
  205. dev_err(dev, "%s: unable to map unsafe buffer %p!\n",
  206. __func__, ptr);
  207. return 0;
  208. }
  209. dev_dbg(dev,
  210. "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
  211. __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
  212. buf->safe, (void *) buf->safe_dma_addr);
  213. if ((dir == DMA_TO_DEVICE) ||
  214. (dir == DMA_BIDIRECTIONAL)) {
  215. dev_dbg(dev, "%s: copy unsafe %p to safe %p, size %d\n",
  216. __func__, ptr, buf->safe, size);
  217. memcpy(buf->safe, ptr, size);
  218. }
  219. consistent_sync(buf->safe, size, dir);
  220. dma_addr = buf->safe_dma_addr;
  221. } else {
  222. consistent_sync(ptr, size, dir);
  223. }
  224. return dma_addr;
  225. }
  226. static inline void
  227. unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
  228. enum dma_data_direction dir)
  229. {
  230. struct dmabounce_device_info *device_info = find_dmabounce_dev(dev);
  231. struct safe_buffer *buf = NULL;
  232. /*
  233. * Trying to unmap an invalid mapping
  234. */
  235. if (dma_addr == ~0) {
  236. dev_err(dev, "Trying to unmap invalid mapping\n");
  237. return;
  238. }
  239. if (device_info)
  240. buf = find_safe_buffer(device_info, dma_addr);
  241. if (buf) {
  242. BUG_ON(buf->size != size);
  243. dev_dbg(dev,
  244. "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
  245. __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
  246. buf->safe, (void *) buf->safe_dma_addr);
  247. DO_STATS ( device_info->bounce_count++ );
  248. if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
  249. unsigned long ptr;
  250. dev_dbg(dev,
  251. "%s: copy back safe %p to unsafe %p size %d\n",
  252. __func__, buf->safe, buf->ptr, size);
  253. memcpy(buf->ptr, buf->safe, size);
  254. /*
  255. * DMA buffers must have the same cache properties
  256. * as if they were really used for DMA - which means
  257. * data must be written back to RAM. Note that
  258. * we don't use dmac_flush_range() here for the
  259. * bidirectional case because we know the cache
  260. * lines will be coherent with the data written.
  261. */
  262. ptr = (unsigned long)buf->ptr;
  263. dmac_clean_range(ptr, ptr + size);
  264. }
  265. free_safe_buffer(device_info, buf);
  266. }
  267. }
  268. static inline void
  269. sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
  270. enum dma_data_direction dir)
  271. {
  272. struct dmabounce_device_info *device_info = find_dmabounce_dev(dev);
  273. struct safe_buffer *buf = NULL;
  274. if (device_info)
  275. buf = find_safe_buffer(device_info, dma_addr);
  276. if (buf) {
  277. /*
  278. * Both of these checks from original code need to be
  279. * commented out b/c some drivers rely on the following:
  280. *
  281. * 1) Drivers may map a large chunk of memory into DMA space
  282. * but only sync a small portion of it. Good example is
  283. * allocating a large buffer, mapping it, and then
  284. * breaking it up into small descriptors. No point
  285. * in syncing the whole buffer if you only have to
  286. * touch one descriptor.
  287. *
  288. * 2) Buffers that are mapped as DMA_BIDIRECTIONAL are
  289. * usually only synced in one dir at a time.
  290. *
  291. * See drivers/net/eepro100.c for examples of both cases.
  292. *
  293. * -ds
  294. *
  295. * BUG_ON(buf->size != size);
  296. * BUG_ON(buf->direction != dir);
  297. */
  298. dev_dbg(dev,
  299. "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
  300. __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
  301. buf->safe, (void *) buf->safe_dma_addr);
  302. DO_STATS ( device_info->bounce_count++ );
  303. switch (dir) {
  304. case DMA_FROM_DEVICE:
  305. dev_dbg(dev,
  306. "%s: copy back safe %p to unsafe %p size %d\n",
  307. __func__, buf->safe, buf->ptr, size);
  308. memcpy(buf->ptr, buf->safe, size);
  309. break;
  310. case DMA_TO_DEVICE:
  311. dev_dbg(dev,
  312. "%s: copy out unsafe %p to safe %p, size %d\n",
  313. __func__,buf->ptr, buf->safe, size);
  314. memcpy(buf->safe, buf->ptr, size);
  315. break;
  316. case DMA_BIDIRECTIONAL:
  317. BUG(); /* is this allowed? what does it mean? */
  318. default:
  319. BUG();
  320. }
  321. consistent_sync(buf->safe, size, dir);
  322. } else {
  323. consistent_sync(dma_to_virt(dev, dma_addr), size, dir);
  324. }
  325. }
  326. /* ************************************************** */
  327. /*
  328. * see if a buffer address is in an 'unsafe' range. if it is
  329. * allocate a 'safe' buffer and copy the unsafe buffer into it.
  330. * substitute the safe buffer for the unsafe one.
  331. * (basically move the buffer from an unsafe area to a safe one)
  332. */
  333. dma_addr_t
  334. dma_map_single(struct device *dev, void *ptr, size_t size,
  335. enum dma_data_direction dir)
  336. {
  337. unsigned long flags;
  338. dma_addr_t dma_addr;
  339. dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n",
  340. __func__, ptr, size, dir);
  341. BUG_ON(dir == DMA_NONE);
  342. local_irq_save(flags);
  343. dma_addr = map_single(dev, ptr, size, dir);
  344. local_irq_restore(flags);
  345. return dma_addr;
  346. }
  347. /*
  348. * see if a mapped address was really a "safe" buffer and if so, copy
  349. * the data from the safe buffer back to the unsafe buffer and free up
  350. * the safe buffer. (basically return things back to the way they
  351. * should be)
  352. */
  353. void
  354. dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
  355. enum dma_data_direction dir)
  356. {
  357. unsigned long flags;
  358. dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n",
  359. __func__, (void *) dma_addr, size, dir);
  360. BUG_ON(dir == DMA_NONE);
  361. local_irq_save(flags);
  362. unmap_single(dev, dma_addr, size, dir);
  363. local_irq_restore(flags);
  364. }
  365. int
  366. dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
  367. enum dma_data_direction dir)
  368. {
  369. unsigned long flags;
  370. int i;
  371. dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
  372. __func__, sg, nents, dir);
  373. BUG_ON(dir == DMA_NONE);
  374. local_irq_save(flags);
  375. for (i = 0; i < nents; i++, sg++) {
  376. struct page *page = sg->page;
  377. unsigned int offset = sg->offset;
  378. unsigned int length = sg->length;
  379. void *ptr = page_address(page) + offset;
  380. sg->dma_address =
  381. map_single(dev, ptr, length, dir);
  382. }
  383. local_irq_restore(flags);
  384. return nents;
  385. }
  386. void
  387. dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
  388. enum dma_data_direction dir)
  389. {
  390. unsigned long flags;
  391. int i;
  392. dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
  393. __func__, sg, nents, dir);
  394. BUG_ON(dir == DMA_NONE);
  395. local_irq_save(flags);
  396. for (i = 0; i < nents; i++, sg++) {
  397. dma_addr_t dma_addr = sg->dma_address;
  398. unsigned int length = sg->length;
  399. unmap_single(dev, dma_addr, length, dir);
  400. }
  401. local_irq_restore(flags);
  402. }
  403. void
  404. dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr, size_t size,
  405. enum dma_data_direction dir)
  406. {
  407. unsigned long flags;
  408. dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n",
  409. __func__, (void *) dma_addr, size, dir);
  410. local_irq_save(flags);
  411. sync_single(dev, dma_addr, size, dir);
  412. local_irq_restore(flags);
  413. }
  414. void
  415. dma_sync_single_for_device(struct device *dev, dma_addr_t dma_addr, size_t size,
  416. enum dma_data_direction dir)
  417. {
  418. unsigned long flags;
  419. dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n",
  420. __func__, (void *) dma_addr, size, dir);
  421. local_irq_save(flags);
  422. sync_single(dev, dma_addr, size, dir);
  423. local_irq_restore(flags);
  424. }
  425. void
  426. dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
  427. enum dma_data_direction dir)
  428. {
  429. unsigned long flags;
  430. int i;
  431. dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
  432. __func__, sg, nents, dir);
  433. BUG_ON(dir == DMA_NONE);
  434. local_irq_save(flags);
  435. for (i = 0; i < nents; i++, sg++) {
  436. dma_addr_t dma_addr = sg->dma_address;
  437. unsigned int length = sg->length;
  438. sync_single(dev, dma_addr, length, dir);
  439. }
  440. local_irq_restore(flags);
  441. }
  442. void
  443. dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
  444. enum dma_data_direction dir)
  445. {
  446. unsigned long flags;
  447. int i;
  448. dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
  449. __func__, sg, nents, dir);
  450. BUG_ON(dir == DMA_NONE);
  451. local_irq_save(flags);
  452. for (i = 0; i < nents; i++, sg++) {
  453. dma_addr_t dma_addr = sg->dma_address;
  454. unsigned int length = sg->length;
  455. sync_single(dev, dma_addr, length, dir);
  456. }
  457. local_irq_restore(flags);
  458. }
  459. int
  460. dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
  461. unsigned long large_buffer_size)
  462. {
  463. struct dmabounce_device_info *device_info;
  464. device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC);
  465. if (!device_info) {
  466. printk(KERN_ERR
  467. "Could not allocated dmabounce_device_info for %s",
  468. dev->bus_id);
  469. return -ENOMEM;
  470. }
  471. device_info->small_buffer_pool =
  472. dma_pool_create("small_dmabounce_pool",
  473. dev,
  474. small_buffer_size,
  475. 0 /* byte alignment */,
  476. 0 /* no page-crossing issues */);
  477. if (!device_info->small_buffer_pool) {
  478. printk(KERN_ERR
  479. "dmabounce: could not allocate small DMA pool for %s\n",
  480. dev->bus_id);
  481. kfree(device_info);
  482. return -ENOMEM;
  483. }
  484. if (large_buffer_size) {
  485. device_info->large_buffer_pool =
  486. dma_pool_create("large_dmabounce_pool",
  487. dev,
  488. large_buffer_size,
  489. 0 /* byte alignment */,
  490. 0 /* no page-crossing issues */);
  491. if (!device_info->large_buffer_pool) {
  492. printk(KERN_ERR
  493. "dmabounce: could not allocate large DMA pool for %s\n",
  494. dev->bus_id);
  495. dma_pool_destroy(device_info->small_buffer_pool);
  496. return -ENOMEM;
  497. }
  498. }
  499. device_info->dev = dev;
  500. device_info->small_buffer_size = small_buffer_size;
  501. device_info->large_buffer_size = large_buffer_size;
  502. INIT_LIST_HEAD(&device_info->safe_buffers);
  503. #ifdef STATS
  504. device_info->sbp_allocs = 0;
  505. device_info->lbp_allocs = 0;
  506. device_info->total_allocs = 0;
  507. device_info->map_op_count = 0;
  508. device_info->bounce_count = 0;
  509. #endif
  510. list_add(&device_info->node, &dmabounce_devs);
  511. printk(KERN_INFO "dmabounce: registered device %s on %s bus\n",
  512. dev->bus_id, dev->bus->name);
  513. return 0;
  514. }
  515. void
  516. dmabounce_unregister_dev(struct device *dev)
  517. {
  518. struct dmabounce_device_info *device_info = find_dmabounce_dev(dev);
  519. if (!device_info) {
  520. printk(KERN_WARNING
  521. "%s: Never registered with dmabounce but attempting" \
  522. "to unregister!\n", dev->bus_id);
  523. return;
  524. }
  525. if (!list_empty(&device_info->safe_buffers)) {
  526. printk(KERN_ERR
  527. "%s: Removing from dmabounce with pending buffers!\n",
  528. dev->bus_id);
  529. BUG();
  530. }
  531. if (device_info->small_buffer_pool)
  532. dma_pool_destroy(device_info->small_buffer_pool);
  533. if (device_info->large_buffer_pool)
  534. dma_pool_destroy(device_info->large_buffer_pool);
  535. #ifdef STATS
  536. print_alloc_stats(device_info);
  537. print_map_stats(device_info);
  538. #endif
  539. list_del(&device_info->node);
  540. kfree(device_info);
  541. printk(KERN_INFO "dmabounce: device %s on %s bus unregistered\n",
  542. dev->bus_id, dev->bus->name);
  543. }
  544. EXPORT_SYMBOL(dma_map_single);
  545. EXPORT_SYMBOL(dma_unmap_single);
  546. EXPORT_SYMBOL(dma_map_sg);
  547. EXPORT_SYMBOL(dma_unmap_sg);
  548. EXPORT_SYMBOL(dma_sync_single);
  549. EXPORT_SYMBOL(dma_sync_sg);
  550. EXPORT_SYMBOL(dmabounce_register_dev);
  551. EXPORT_SYMBOL(dmabounce_unregister_dev);
  552. MODULE_AUTHOR("Christopher Hoover <ch@hpl.hp.com>, Deepak Saxena <dsaxena@plexity.net>");
  553. MODULE_DESCRIPTION("Special dma_{map/unmap/dma_sync}_* routines for systems with limited DMA windows");
  554. MODULE_LICENSE("GPL");