Thread (27 messages) 27 messages, 6 authors, 2019-09-02

Re: [PATCH v2 10/11] arm64: edit zone_dma_bits to fine tune dma-direct min mask

From: Petr Tesarik <hidden>
Date: 2019-08-27 07:03:48
Also in: linux-arm-kernel, linux-devicetree, linux-iommu, linux-mm, linux-riscv, lkml

On Mon, 26 Aug 2019 13:08:50 +0200
Nicolas Saenz Julienne [off-list ref] wrote:
On Mon, 2019-08-26 at 09:06 +0200, Christoph Hellwig wrote:
quoted
On Tue, Aug 20, 2019 at 04:58:18PM +0200, Nicolas Saenz Julienne wrote:  
quoted
-	if (IS_ENABLED(CONFIG_ZONE_DMA))
+	if (IS_ENABLED(CONFIG_ZONE_DMA)) {
 		arm64_dma_phys_limit = max_zone_dma_phys();
+		zone_dma_bits = ilog2((arm64_dma_phys_limit - 1) &
GENMASK_ULL(31, 0)) + 1;  
 
Hi Christoph,
thanks for the rewiews.
quoted
This adds a way too long line.  
I know, I couldn't find a way to split the operation without making it even
harder to read. I'll find a solution.
If all else fails, move the code to an inline function and call it e.g.
phys_limit_to_dma_bits().

Just my two cents,
Petr T

Attachments

  • (unnamed) [application/pgp-signature] 488 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help