Merge branch 'stable/for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb
Pull swiotlb fixes from Konrad Rzeszutek Wilk: "This has one fix to make i915 work when using Xen SWIOTLB, and a feature from Geert to aid in debugging of devices that can't do DMA outside the 32-bit address space. The feature from Geert is on top of v4.10 merge window commit (specifically you pulling my previous branch), as his changes were dependent on the Documentation/ movement patches. I figured it would just easier than me trying than to cherry-pick the Documentation patches to satisfy git. The patches have been soaking since 12/20, albeit I updated the last patch due to linux-next catching an compiler error and adding an Tested-and-Reported-by tag" * 'stable/for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb: Export swiotlb_max_segment to users swiotlb: Add swiotlb=noforce debug option swiotlb: Convert swiotlb_force from int to enum x86, swiotlb: Simplify pci_swiotlb_detect_override()
This commit is contained in:
@@ -2306,15 +2306,6 @@ unlock:
|
||||
mutex_unlock(&obj->mm.lock);
|
||||
}
|
||||
|
||||
static unsigned int swiotlb_max_size(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_SWIOTLB)
|
||||
return rounddown(swiotlb_nr_tbl() << IO_TLB_SHIFT, PAGE_SIZE);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void i915_sg_trim(struct sg_table *orig_st)
|
||||
{
|
||||
struct sg_table new_st;
|
||||
@@ -2362,7 +2353,7 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
|
||||
GEM_BUG_ON(obj->base.read_domains & I915_GEM_GPU_DOMAINS);
|
||||
GEM_BUG_ON(obj->base.write_domain & I915_GEM_GPU_DOMAINS);
|
||||
|
||||
max_segment = swiotlb_max_size();
|
||||
max_segment = swiotlb_max_segment();
|
||||
if (!max_segment)
|
||||
max_segment = rounddown(UINT_MAX, PAGE_SIZE);
|
||||
|
||||
|
Reference in New Issue
Block a user