swiotlb: ensure a segment doesn't cross the area boundary
authorChao Gao <chao.gao@intel.com>
Fri, 15 Jul 2022 10:45:35 +0000 (18:45 +0800)
committerChristoph Hellwig <hch@lst.de>
Mon, 18 Jul 2022 04:50:01 +0000 (06:50 +0200)
commit57e6840cf79a4af84f44af3f8cfeacd8a14a6c6f
tree066c3e6401fa68816347a4c109db5b94d729af56
parent44335487bab05e06902f9184179857aae764bfe6
swiotlb: ensure a segment doesn't cross the area boundary

Free slots tracking assumes that slots in a segment can be allocated to
fulfill a request. This implies that slots in a segment should belong to
the same area. Although the possibility of a violation is low, it is better
to explicitly enforce segments won't span multiple areas by adjusting the
number of slabs when configuring areas.

Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/swiotlb.c