Merge tag 'powerpc-5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux-2.6-microblaze.git] / arch / powerpc / kernel / fadump.c
index cf92f3f..65562c4 100644 (file)
@@ -112,6 +112,12 @@ static int __init fadump_cma_init(void)
                return 1;
        }
 
+       /*
+        *  If CMA activation fails, keep the pages reserved, instead of
+        *  exposing them to buddy allocator. Same as 'fadump=nocma' case.
+        */
+       cma_reserve_pages_on_error(fadump_cma);
+
        /*
         * So we now have successfully initialized cma area for fadump.
         */
@@ -544,7 +550,7 @@ int __init fadump_reserve_mem(void)
                if (!fw_dump.nocma) {
                        fw_dump.boot_memory_size =
                                ALIGN(fw_dump.boot_memory_size,
-                                     FADUMP_CMA_ALIGNMENT);
+                                     CMA_MIN_ALIGNMENT_BYTES);
                }
 #endif