Merge tag 'dma-mapping-6.6-2023-10-28' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping fix from Christoph Hellwig: - reduce the initialy dynamic swiotlb size to remove an annoying but harmless warning from the page allocator (Petr Tesarik) * tag 'dma-mapping-6.6-2023-10-28' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: do not try to allocate a TLB bigger than MAX_ORDER pages
This commit is contained in:
@@ -678,6 +678,11 @@ static struct io_tlb_pool *swiotlb_alloc_pool(struct device *dev,
|
||||
size_t pool_size;
|
||||
size_t tlb_size;
|
||||
|
||||
if (nslabs > SLABS_PER_PAGE << MAX_ORDER) {
|
||||
nslabs = SLABS_PER_PAGE << MAX_ORDER;
|
||||
nareas = limit_nareas(nareas, nslabs);
|
||||
}
|
||||
|
||||
pool_size = sizeof(*pool) + array_size(sizeof(*pool->areas), nareas);
|
||||
pool = kzalloc(pool_size, gfp);
|
||||
if (!pool)
|
||||
|
Reference in New Issue
Block a user