On 2/22/22 9:05 PM, Christoph Hellwig wrote: > Use the more specific is_swiotlb_active check instead of checking the > global swiotlb_force variable. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- > kernel/dma/direct.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h > index 4632b0f4f72eb..4dc16e08c7e1a 100644 > --- a/kernel/dma/direct.h > +++ b/kernel/dma/direct.h > @@ -91,7 +91,7 @@ static inline dma_addr_t dma_direct_map_page(struct device > *dev, > return swiotlb_map(dev, phys, size, dir, attrs); > > if (unlikely(!dma_capable(dev, dma_addr, size, true))) { > - if (swiotlb_force != SWIOTLB_NO_FORCE) > + if (is_swiotlb_active(dev)) > return swiotlb_map(dev, phys, size, dir, attrs); > > dev_WARN_ONCE(dev, 1, > Reviewed-by: Anshuman Khandual <anshuman.khand...@arm.com>
- cleanup swiotlb initialization Christoph Hellwig
- [PATCH 09/11] swiotlb: add a SWIOTLB_ANY flag to li... Christoph Hellwig
- [PATCH 10/11] swiotlb: merge swiotlb-xen initializa... Christoph Hellwig
- Re: [PATCH 10/11] swiotlb: merge swiotlb-xen in... Anshuman Khandual
- [PATCH 02/11] swiotlb: make swiotlb_exit a no-op if... Christoph Hellwig
- Re: [PATCH 02/11] swiotlb: make swiotlb_exit a ... Anshuman Khandual
- [PATCH 06/11] MIPS/octeon: use swiotlb_init instead... Christoph Hellwig
- [PATCH 01/11] dma-direct: use is_swiotlb_active in ... Christoph Hellwig
- Re: [PATCH 01/11] dma-direct: use is_swiotlb_ac... Anshuman Khandual
- [PATCH 11/11] x86: remove cruft from <asm/dma-ma... Christoph Hellwig
- [PATCH 07/11] x86: remove the IOMMU table infrastru... Christoph Hellwig
- Re: [PATCH 07/11] x86: remove the IOMMU table i... Anshuman Khandual
- [PATCH 05/11] swiotlb: pass a gfp_mask argument to ... Christoph Hellwig
- Re: [PATCH 05/11] swiotlb: pass a gfp_mask argu... Anshuman Khandual
- [PATCH 03/11] swiotlb: simplify swiotlb_max_segment Christoph Hellwig
- Re: [PATCH 03/11] swiotlb: simplify swiotlb_max... Anshuman Khandual
- [PATCH 04/11] swiotlb: rename swiotlb_late_init_wit... Christoph Hellwig
- Re: [PATCH 04/11] swiotlb: rename swiotlb_late_... Anshuman Khandual
- [PATCH 08/11] swiotlb: make the swiotlb_init interf... Christoph Hellwig