kernel_optimize_test/include
Tom Lendacky cfaed10d1f scatterlist: introduce sg_nents_for_len
When performing a dma_map_sg() call, the number of sg entries to map is
required. Using sg_nents to retrieve the number of sg entries will
return the total number of entries in the sg list up to the entry marked
as the end. If there happen to be unused entries in the list, these will
still be counted. Some dma_map_sg() implementations will not handle the
unused entries correctly (lib/swiotlb.c) and execute a BUG_ON.

The sg_nents_for_len() function will traverse the sg list and return the
number of entries required to satisfy the supplied length argument. This
can then be supplied to the dma_map_sg() call to successfully map the
sg.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2015-06-03 10:51:27 +08:00
..
acpi
asm-generic Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-04-14 21:03:26 -07:00
clocksource
crypto crypto: aead - Add multiple algorithm registration interface 2015-06-03 10:48:35 +08:00
drm
dt-bindings Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2015-04-15 15:48:28 -07:00
keys
kvm
linux scatterlist: introduce sg_nents_for_len 2015-06-03 10:51:27 +08:00
math-emu
media
memory
misc
net ipsec: Add IV generator information to xfrm_state 2015-05-28 11:23:20 +08:00
pcmcia
ras
rdma
rxrpc
scsi
soc
sound
target
trace mm: cma: add trace events for CMA allocations and freeings 2015-04-15 16:35:19 -07:00
uapi sound updates for 4.1-rc1 2015-04-15 15:41:41 -07:00
video
xen
Kbuild