dma-pool fixes
Christoph Hellwig
hch at lst.de
Tue Jul 28 08:07:16 EDT 2020
On Tue, Jul 28, 2020 at 05:32:56PM +0530, Amit Pundir wrote:
> > can you try these two patches? The first one makes sure we don't apply
> > physical address based checks for IOMMU allocations, and the second one
> > is a slightly tweaked version of the patch from Nicolas to allow dipping
> > into the CMA areas for allocations to expand the atomic pools.
>
> Sorry, verified a couple of times but these two patches are not working
> for me. I'm stuck at the bootloader splash screen on my phone.
Thanks for testing. The only intended functional change compared to
Fridays patch was the issue Nicolas pointed out. Can you try this hack
on top?
diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c
index 83fda10394937b..88e40a022b6bfd 100644
--- a/kernel/dma/pool.c
+++ b/kernel/dma/pool.c
@@ -70,13 +70,14 @@ static bool cma_in_zone(gfp_t gfp)
size = cma_get_size(cma);
if (!size)
return false;
-
+#if 0
/* CMA can't cross zone boundaries, see cma_activate_area() */
end = cma_get_base(cma) - memblock_start_of_DRAM() + size - 1;
if (IS_ENABLED(CONFIG_ZONE_DMA) && (gfp & GFP_DMA))
return end <= DMA_BIT_MASK(zone_dma_bits);
if (IS_ENABLED(CONFIG_ZONE_DMA32) && (gfp & GFP_DMA32))
return end <= DMA_BIT_MASK(32);
+#endif
return true;
}
More information about the linux-rpi-kernel
mailing list