]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-cma-allocate-cma-areas-bottom-up-fix-2
authorRoman Gushchin <guro@fb.com>
Thu, 31 Dec 2020 22:04:26 +0000 (22:04 +0000)
committerJohannes Weiner <hannes@cmpxchg.org>
Thu, 31 Dec 2020 22:04:26 +0000 (22:04 +0000)
fix 32-bit warnings

Link: https://lkml.kernel.org/r/20201223163537.GA4011967@carbon.DHCP.thefacebook.com
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/cma.c

index 4fe74c9d83b06c19aa198957de54db5a03de250d..5d69b498603a0c970af2695075aed919bf46b582 100644 (file)
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -344,12 +344,14 @@ 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 (!memblock_bottom_up() && memblock_end >= SZ_4G + size) {
                        memblock_set_bottom_up(true);
                        addr = memblock_alloc_range_nid(size, alignment, SZ_4G,
                                                        limit, nid, true);
                        memblock_set_bottom_up(false);
                }
+#endif
 
                if (!addr) {
                        addr = memblock_alloc_range_nid(size, alignment, base,