Message ID | 20210209062131.2300005-1-tientzu@chromium.org |
---|---|
Headers | show |
Series | Restricted DMA | expand |
On Tue, Feb 09, 2021 at 02:21:18PM +0800, Claire Chang wrote: > This can be dropped if Christoph's swiotlb cleanups are landed. > https://lore.kernel.org/linux-iommu/20210207160934.2955931-1-hch@lst.de/T/#m7124f29b6076d462101fcff6433295157621da09 FYI, I've also started looking into additional cleanups based on your struct in this branch, but I'd like to wait for all the previous changes to settle first: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/swiotlb-struct
> diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c > index fd9c1bd183ac..8b77fd64199e 100644 > --- a/kernel/dma/swiotlb.c > +++ b/kernel/dma/swiotlb.c > @@ -836,6 +836,40 @@ late_initcall(swiotlb_create_default_debugfs); > #endif > > #ifdef CONFIG_DMA_RESTRICTED_POOL > +struct page *dev_swiotlb_alloc(struct device *dev, size_t size, gfp_t gfp) > +{ > + struct swiotlb *swiotlb; > + phys_addr_t tlb_addr; > + unsigned int index; > + > + /* dev_swiotlb_alloc can be used only in the context which permits sleeping. */ > + if (!dev->dev_swiotlb || !gfpflags_allow_blocking(gfp)) Just noticed that !gfpflags_allow_blocking(gfp) shouldn't be here. Hi Christoph, Do you think I should fix this and rebase on the latest linux-next now? I wonder if there are more factor and clean up coming and I should wait after that. Thanks, Claire
On Fri, Feb 26, 2021 at 12:17:50PM +0800, Claire Chang wrote: > Do you think I should fix this and rebase on the latest linux-next > now? I wonder if there are more factor and clean up coming and I > should wait after that. Here is my preferred plan: 1) wait for my series to support the min alignment in swiotlb to land in Linus tree 2) I'll resend my series with the further swiotlb cleanup and refactoring, which includes a slightly rebased version of your patch to add the io_tlb_mem structure 3) resend your series on top of that as a baseline This is my current WIP tree for 2: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/swiotlb-struct
On Fri, Feb 26, 2021 at 1:17 PM Christoph Hellwig <hch@lst.de> wrote: > > On Fri, Feb 26, 2021 at 12:17:50PM +0800, Claire Chang wrote: > > Do you think I should fix this and rebase on the latest linux-next > > now? I wonder if there are more factor and clean up coming and I > > should wait after that. > > Here is my preferred plan: > > 1) wait for my series to support the min alignment in swiotlb to > land in Linus tree > 2) I'll resend my series with the further swiotlb cleanup and > refactoring, which includes a slightly rebased version of your > patch to add the io_tlb_mem structure > 3) resend your series on top of that as a baseline > > This is my current WIP tree for 2: > > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/swiotlb-struct Sounds good to me. Thanks!
v5 here: https://lore.kernel.org/patchwork/cover/1416899/ to rebase onto Christoph's swiotlb cleanups.