--- zzzz-none-000/linux-4.9.276/mm/cma.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/mm/cma.c 2023-04-05 08:19:02.000000000 +0000 @@ -178,8 +178,16 @@ return -ENOSPC; } +/* + * MIPS uses bootmem to manage early memory allocations and only partly + * memblock in kernel 4.9. At this point in the memblock is not fully + * initialized on MIPS and this checks fails. I think this should work + * better starting with kernel 5.4 and this check should work fine also on MIPS. + */ +#ifndef CONFIG_MIPS if (!size || !memblock_is_region_reserved(base, size)) return -EINVAL; +#endif /* ensure minimal alignment required by mm core */ alignment = PAGE_SIZE <<