Thread (35 messages) 35 messages, 11 authors, 2020-08-02

Re: [PATCH 02/15] dma-contiguous: simplify cma_early_percent_memory()

From: Christoph Hellwig <hch@lst.de>
Date: 2020-07-28 06:37:58
Also in: linux-arm-kernel, linux-iommu, linux-mips, linux-mm, linux-riscv, linux-s390, linux-sh, lkml, sparclinux

On Tue, Jul 28, 2020 at 08:11:40AM +0300, Mike Rapoport wrote:
From: Mike Rapoport <redacted>

The memory size calculation in cma_early_percent_memory() traverses
memblock.memory rather than simply call memblock_phys_mem_size(). The
comment in that function suggests that at some point there should have been
call to memblock_analyze() before memblock_phys_mem_size() could be used.
As of now, there is no memblock_analyze() at all and
memblock_phys_mem_size() can be used as soon as cold-plug memory is
registerd with memblock.

Replace loop over memblock.memory with a call to memblock_phys_mem_size().

Signed-off-by: Mike Rapoport <redacted>
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help