Files
Linux/include/linux
Robin Murphy 002edb6f6f dma-mapping: tidy up dma_parms default handling
Many DMA controllers and other devices set max_segment_size to
indicate their scatter-gather capability, but have no interest in
segment_boundary_mask. However, the existence of a dma_parms structure
precludes the use of any default value, leaving them as zeros (assuming
a properly kzalloc'ed structure). If a well-behaved IOMMU (or SWIOTLB)
then tries to respect this by ensuring a mapped segment does not cross
a zero-byte boundary, hilarity ensues.

Since zero is a nonsensical value for either parameter, treat it as an
indicator for "default", as might be expected. In the process, clean up
a bit by replacing the bare constants with slightly more meaningful
macros and removing the superfluous "else" statements.

[[email protected]: dma-mapping.h needs sizes.h for SZ_64K]
Signed-off-by: Robin Murphy <[email protected]>
Reviewed-by: Sumit Semwal <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2015-11-06 17:50:42 -08:00
..
2015-10-01 12:48:11 -07:00
2015-10-17 21:22:08 -07:00
2015-10-07 18:08:15 +01:00
…
…
…
…
…
…
…
2015-10-27 19:34:54 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-11-06 17:50:42 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-10-07 16:02:49 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-09-08 15:35:28 -07:00
…
…
2015-10-18 10:14:39 -07:00
…
2015-10-31 19:05:59 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-11-05 23:10:54 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-09-08 15:35:28 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-10-23 05:44:28 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-10-01 15:06:43 +02:00
2015-10-13 19:01:25 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-11-06 17:50:42 -08:00
…
…
…
…
…
2015-10-20 22:10:45 +08:00
…
…
…
…
…
…
…
…
…
2015-10-08 05:26:35 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-11-06 17:50:42 -08:00
…
…
…
…
…
…
…
…
2015-09-08 15:35:28 -07:00
…
…
2015-09-13 11:27:30 +02:00
…
…
…
…
…
…
…
…
…
…
…
2015-10-06 17:08:19 +02:00
…
…
…
…
…
2015-10-22 08:59:18 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-09-10 15:36:59 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-10-22 06:22:13 -07:00
…
…
…
…
…
…
…
…
2015-10-01 09:57:59 -07:00
…
…
2015-10-19 01:01:21 +02:00
…
2015-10-17 21:32:21 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-09-08 15:35:28 -07:00
…
…
…
…