]> git.baikalelectronics.ru Git - kernel.git/commit
swiotlb: Export swiotlb_max_segment to users
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 20 Dec 2016 15:02:02 +0000 (10:02 -0500)
committerKonrad Rzeszutek Wilk <konrad@kernel.org>
Fri, 6 Jan 2017 18:00:01 +0000 (13:00 -0500)
commitdcf1cfdd1bc6d23473ea2863e943e0a4189c3e99
treed6303358532275cd114b471810d6fc2333780367
parent73aadc24c3c1e8e61a03ce93757013a63058bed2
swiotlb: Export swiotlb_max_segment to users

So they can figure out what is the optimal number of pages
that can be contingously stitched together without fear of
bounce buffer.

We also expose an mechanism for sub-users of SWIOTLB API, such
as Xen-SWIOTLB to set the max segment value. And lastly
if swiotlb=force is set (which mandates we bounce buffer everything)
we set max_segment so at least we can bounce buffer one 4K page
instead of a giant 512KB one for which we may not have space.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reported-and-Tested-by: Juergen Gross <jgross@suse.com>
drivers/gpu/drm/i915/i915_gem.c
drivers/xen/swiotlb-xen.c
include/linux/swiotlb.h
lib/swiotlb.c