From: Christoph Hellwig Date: Wed, 13 Feb 2019 07:01:03 +0000 (+0100) Subject: dma-direct: we might need GFP_DMA for 32-bit dma masks X-Git-Tag: v5.4-rc1~1376^2~123^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbce251baa6e357441961c78796e5e9fad682675;p=platform%2Fkernel%2Flinux-rpi.git dma-direct: we might need GFP_DMA for 32-bit dma masks If there is no ZONE_DMA32 we might need GFP_DMA to be able to allocate memory that satisfies a 32-bit DMA mask. Reported-by: Christian Zigotzky Signed-off-by: Christoph Hellwig Tested-by: Christian Zigotzky Signed-off-by: Michael Ellerman --- diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 355d16ac..d5bb51c 100644 --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c @@ -132,8 +132,7 @@ again: goto again; } - if (IS_ENABLED(CONFIG_ZONE_DMA) && - phys_mask < DMA_BIT_MASK(32) && !(gfp & GFP_DMA)) { + if (IS_ENABLED(CONFIG_ZONE_DMA) && !(gfp & GFP_DMA)) { gfp = (gfp & ~GFP_DMA32) | GFP_DMA; goto again; }