[PATCH v4 12/14] swiotlb: Add restricted DMA alloc/free support.
Claire Chang
tientzu at chromium.org
Fri Feb 26 15:17:50 AEDT 2021
> 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
More information about the Linuxppc-dev
mailing list