linux/include
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.

[akpm@linux-foundation.org: dma-mapping.h needs sizes.h for SZ_64K]
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-06 17:50:42 -08:00
..
acpi Merge branch 'acpi-processor' 2015-11-02 00:50:37 +01:00
asm-generic Power management and ACPI updates for v4.4-rc1 2015-11-04 18:10:13 -08:00
clocksource
crypto Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2015-11-05 15:32:38 -08:00
drm signals: kill block_all_signals() and unblock_all_signals() 2015-11-06 17:50:42 -08:00
dt-bindings - New Device Support 2015-11-06 10:23:50 -08:00
keys KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
kvm s390: A bunch of fixes and optimizations for interrupt and time 2015-11-05 16:26:26 -08:00
linux dma-mapping: tidy up dma_parms default handling 2015-11-06 17:50:42 -08:00
math-emu
media [media] v4l2: add support for SDR transmitter 2015-10-20 15:40:50 -02:00
memory
misc
net mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
pcmcia
ras
rdma
rxrpc
scsi
soc
sound Merge remote-tracking branches 'asoc/fix/rt298', 'asoc/fix/sx', 'asoc/fix/wm8904' and 'asoc/fix/wm8962' into asoc-linus 2015-10-23 08:44:14 +09:00
target
trace nilfs2: add tracepoints for analyzing reading and writing metadata files 2015-11-06 17:50:42 -08:00
uapi Merge branch 'akpm' (patches from Andrew) 2015-11-05 23:10:54 -08:00
video
xen xen/grant-table: Add an helper to iterate over a specific number of grants 2015-10-23 14:20:46 +01:00
Kbuild