diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-16 20:39:14 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-16 20:39:14 -0500 |
| commit | 9b690c3d56ce15dd265b6398f9d8d58c29c17032 (patch) | |
| tree | 56477d1f4e596011f17d1c64e8597613330e5439 /include/linux | |
| parent | 36cd5c19c3fe8291fac45a262c44c00bd14b531a (diff) | |
| parent | af51a9f1848ff50079a10def56a2c064f326af22 (diff) | |
Merge tag 'stable/for-linus-3.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb
Pull swiotlb update from Konrad Rzeszutek Wilk:
"Feature:
- Use dma addresses instead of the virt_to_phys and vice versa
functions.
Remove the multitude of phys_to_virt/virt_to_phys calls and instead
operate on the physical addresses instead of virtual in many of the
internal functions. This does provide a speed up in interrupt
handlers that do DMA operations and use SWIOTLB."
* tag 'stable/for-linus-3.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
swiotlb: Do not export swiotlb_bounce since there are no external consumers
swiotlb: Use physical addresses instead of virtual in swiotlb_tbl_sync_single
swiotlb: Use physical addresses for swiotlb_tbl_unmap_single
swiotlb: Return physical addresses when calling swiotlb_tbl_map_single
swiotlb: Make io_tlb_overflow_buffer a physical address
swiotlb: Make io_tlb_start a physical address instead of a virtual one
swiotlb: Make io_tlb_end a physical address instead of a virtual one
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/swiotlb.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 8d08b3ed406d..071d62c214a6 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
| @@ -34,21 +34,25 @@ enum dma_sync_target { | |||
| 34 | SYNC_FOR_CPU = 0, | 34 | SYNC_FOR_CPU = 0, |
| 35 | SYNC_FOR_DEVICE = 1, | 35 | SYNC_FOR_DEVICE = 1, |
| 36 | }; | 36 | }; |
| 37 | extern void *swiotlb_tbl_map_single(struct device *hwdev, dma_addr_t tbl_dma_addr, | ||
| 38 | phys_addr_t phys, size_t size, | ||
| 39 | enum dma_data_direction dir); | ||
| 40 | 37 | ||
| 41 | extern void swiotlb_tbl_unmap_single(struct device *hwdev, char *dma_addr, | 38 | /* define the last possible byte of physical address space as a mapping error */ |
| 39 | #define SWIOTLB_MAP_ERROR (~(phys_addr_t)0x0) | ||
| 40 | |||
| 41 | extern phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, | ||
| 42 | dma_addr_t tbl_dma_addr, | ||
| 43 | phys_addr_t phys, size_t size, | ||
| 44 | enum dma_data_direction dir); | ||
| 45 | |||
| 46 | extern void swiotlb_tbl_unmap_single(struct device *hwdev, | ||
| 47 | phys_addr_t tlb_addr, | ||
| 42 | size_t size, enum dma_data_direction dir); | 48 | size_t size, enum dma_data_direction dir); |
| 43 | 49 | ||
| 44 | extern void swiotlb_tbl_sync_single(struct device *hwdev, char *dma_addr, | 50 | extern void swiotlb_tbl_sync_single(struct device *hwdev, |
| 51 | phys_addr_t tlb_addr, | ||
| 45 | size_t size, enum dma_data_direction dir, | 52 | size_t size, enum dma_data_direction dir, |
| 46 | enum dma_sync_target target); | 53 | enum dma_sync_target target); |
| 47 | 54 | ||
| 48 | /* Accessory functions. */ | 55 | /* Accessory functions. */ |
| 49 | extern void swiotlb_bounce(phys_addr_t phys, char *dma_addr, size_t size, | ||
| 50 | enum dma_data_direction dir); | ||
| 51 | |||
| 52 | extern void | 56 | extern void |
| 53 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, | 57 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, |
| 54 | dma_addr_t *dma_handle, gfp_t flags); | 58 | dma_addr_t *dma_handle, gfp_t flags); |
