From 15d8bd51fbe44442237f08e382466a05ca1711ef Mon Sep 17 00:00:00 2001 From: Roman Gushchin Date: Thu, 31 Dec 2020 22:04:27 +0000 Subject: [PATCH] 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 --- mm/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/cma.c b/mm/cma.c index 5d69b498603a..c4026481ed2f 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, -- 2.50.1