Skip to content
Commit ad96ce32 authored by Petr Tesarik's avatar Petr Tesarik Committed by Christoph Hellwig
Browse files

swiotlb: determine potential physical address limit



The value returned by default_swiotlb_limit() should be constant, because
it is used to decide whether DMA can be used. To allow allocating memory
pools on the fly, use the maximum possible physical address rather than the
highest address used by the default pool.

For swiotlb_init_remap(), this is either an arch-specific limit used by
memblock_alloc_low(), or the highest directly mapped physical address if
the initialization flags include SWIOTLB_ANY. For swiotlb_init_late(), the
highest address is determined by the GFP flags.

Signed-off-by: default avatarPetr Tesarik <petr.tesarik.ext@huawei.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 79636caa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment