From: Roman Gushchin Date: Thu, 31 Dec 2020 22:04:27 +0000 (+0000) Subject: mm-cma-allocate-cma-areas-bottom-up-fix-3 X-Git-Tag: howlett/maple_spf/20210104~124 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=15d8bd51fbe44442237f08e382466a05ca1711ef;p=users%2Fjedix%2Flinux-maple.git mm-cma-allocate-cma-areas-bottom-up-fix-3 > 32-bit systems can have more than 32 bit in the physical address. > I think a better option would be to use CONFIG_PHYS_ADDR_T_64BIT I agree. An updated fixup below. Cc: Mike Rapoport Cc: Stephen Rothwell Signed-off-by: Andrew Morton --- diff --git a/mm/cma.c b/mm/cma.c index 5d69b498603a0..c4026481ed2f5 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -344,7 +344,7 @@ int __init cma_declare_contiguous_nid(phys_addr_t base, * Avoid using first 4GB to not interfere with constrained zones * like DMA/DMA32. */ -#if BITS_PER_LONG > 32 +#if CONFIG_PHYS_ADDR_T_64BIT if (!memblock_bottom_up() && memblock_end >= SZ_4G + size) { memblock_set_bottom_up(true); addr = memblock_alloc_range_nid(size, alignment, SZ_4G,