[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 05/15] swiotlb: Add a new get_io_tlb_mem getter
- To: Christoph Hellwig <hch@xxxxxx>
- From: Claire Chang <tientzu@xxxxxxxxxxxx>
- Date: Wed, 12 May 2021 00:42:22 +0800
- Cc: Rob Herring <robh+dt@xxxxxxxxxx>, mpe@xxxxxxxxxxxxxx, Joerg Roedel <joro@xxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Frank Rowand <frowand.list@xxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, "list@xxxxxxx:IOMMU DRIVERS" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, sstabellini@xxxxxxxxxx, Robin Murphy <robin.murphy@xxxxxxx>, grant.likely@xxxxxxx, xypron.glpk@xxxxxx, Thierry Reding <treding@xxxxxxxxxx>, mingo@xxxxxxxxxx, bauerman@xxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>, Saravana Kannan <saravanak@xxxxxxxxxx>, "Rafael J . Wysocki" <rafael.j.wysocki@xxxxxxxxx>, heikki.krogerus@xxxxxxxxxxxxxxx, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>, linux-devicetree <devicetree@xxxxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Nicolas Boichat <drinkcat@xxxxxxxxxxxx>, Jim Quinlan <james.quinlan@xxxxxxxxxxxx>, Tomasz Figa <tfiga@xxxxxxxxxxxx>, bskeggs@xxxxxxxxxx, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, chris@xxxxxxxxxxxxxxxxxx, Daniel Vetter <daniel@xxxxxxxx>, airlied@xxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, jani.nikula@xxxxxxxxxxxxxxx, Jianxiong Gao <jxgao@xxxxxxxxxx>, joonas.lahtinen@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, maarten.lankhorst@xxxxxxxxxxxxxxx, matthew.auld@xxxxxxxxx, nouveau@xxxxxxxxxxxxxxxxxxxxx, rodrigo.vivi@xxxxxxxxx, thomas.hellstrom@xxxxxxxxxxxxxxx
- Delivery-date: Tue, 11 May 2021 16:42:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, May 10, 2021 at 11:03 PM Christoph Hellwig <hch@xxxxxx> wrote:
>
> > +static inline struct io_tlb_mem *get_io_tlb_mem(struct device *dev)
> > +{
> > +#ifdef CONFIG_DMA_RESTRICTED_POOL
> > + if (dev && dev->dma_io_tlb_mem)
> > + return dev->dma_io_tlb_mem;
> > +#endif /* CONFIG_DMA_RESTRICTED_POOL */
> > +
> > + return io_tlb_default_mem;
>
> Given that we're also looking into a not addressing restricted pool
> I'd rather always assign the active pool to dev->dma_io_tlb_mem and
> do away with this helper.
Where do you think is the proper place to do the assignment? First
time calling swiotlb_map? or in of_dma_configure_id?
|