]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-cma-allocate-cma-areas-bottom-up-fix-3
authorRoman Gushchin <guro@fb.com>
Thu, 31 Dec 2020 22:04:27 +0000 (22:04 +0000)
committerJohannes Weiner <hannes@cmpxchg.org>
Thu, 31 Dec 2020 22:04:27 +0000 (22:04 +0000)
> 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 <rppt@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/cma.c

index 5d69b498603a0c970af2695075aed919bf46b582..c4026481ed2f5139da1a47db95e30254ff7df505 100644 (file)
--- 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,