Skip to content
Commit f8e71c66 authored by Jianxiong Gao's avatar Jianxiong Gao Committed by Greg Kroah-Hartman
Browse files

swiotlb: respect min_align_mask



commit: 1f221a0d

swiotlb: respect min_align_mask

Respect the min_align_mask in struct device_dma_parameters in swiotlb.

There are two parts to it:
 1) for the lower bits of the alignment inside the io tlb slot, just
    extent the size of the allocation and leave the start of the slot
     empty
 2) for the high bits ensure we find a slot that matches the high bits
    of the alignment to avoid wasting too much memory

Based on an earlier patch from Jianxiong Gao <jxgao@google.com>.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarJianxiong Gao <jxgao@google.com>
Tested-by: default avatarJianxiong Gao <jxgao@google.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: default avatarJianxiong Gao <jxgao@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 85a5a687
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment