[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 3/6] swiotlb: Use restricted DMA pool if available
- To: Claire Chang <tientzu@xxxxxxxxxxxx>
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Wed, 13 Jan 2021 13:44:16 +0100
- Cc: robh+dt@xxxxxxxxxx, mpe@xxxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, joro@xxxxxxxxxx, will@xxxxxxxxxx, frowand.list@xxxxxxxxx, konrad.wilk@xxxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, sstabellini@xxxxxxxxxx, hch@xxxxxx, m.szyprowski@xxxxxxxxxxx, robin.murphy@xxxxxxx, grant.likely@xxxxxxx, xypron.glpk@xxxxxx, treding@xxxxxxxxxx, mingo@xxxxxxxxxx, bauerman@xxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, saravanak@xxxxxxxxxx, rafael.j.wysocki@xxxxxxxxx, heikki.krogerus@xxxxxxxxxxxxxxx, andriy.shevchenko@xxxxxxxxxxxxxxx, rdunlap@xxxxxxxxxxxxx, dan.j.williams@xxxxxxxxx, bgolaszewski@xxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, tfiga@xxxxxxxxxxxx, drinkcat@xxxxxxxxxxxx
- Delivery-date: Wed, 13 Jan 2021 12:44:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
> +#ifdef CONFIG_SWIOTLB
> + if (unlikely(swiotlb_force == SWIOTLB_FORCE) || dev->dma_io_tlb_mem)
> return swiotlb_map(dev, phys, size, dir, attrs);
> +#endif
Please provide a wrapper for the dev->dma_io_tlb_mem check that
always returns false if the per-device swiotlb support is not enabled.
> index 7fb2ac087d23..1f05af09e61a 100644
> --- a/kernel/dma/swiotlb.c
> +++ b/kernel/dma/swiotlb.c
> @@ -222,7 +222,6 @@ int __init swiotlb_init_with_tbl(char *tlb, unsigned long
> nslabs, int verbose)
> mem->orig_addr[i] = INVALID_PHYS_ADDR;
> }
> mem->index = 0;
> - no_iotlb_memory = false;
How does this fit in here?
|