Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

of: of_reserved_mem: mark nomap memory instead of removing

Since commit 86588296acbf ("fdt: Properly handle "no-map" field in the memory region"),
nomap memory is changed to call memblock_mark_nomap() instead of
memblock_remove(). But it only changed the reserved memory with fixed
addr and size case in early_init_dt_reserve_memory_arch(), not
including the dynamical allocation by size case in
early_init_dt_alloc_reserved_memory_arch().

Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/r/20210611131153.3731147-2-aisheng.dong@nxp.com
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Dong Aisheng and committed by
Rob Herring
7b25995f 3c6867a1

+2 -2
+2 -2
drivers/of/of_reserved_mem.c
··· 42 42 43 43 *res_base = base; 44 44 if (nomap) 45 - return memblock_remove(base, size); 45 + return memblock_mark_nomap(base, size); 46 46 47 47 return memblock_reserve(base, size); 48 48 } ··· 276 276 pr_info("node %s compatible matching fail\n", 277 277 rmem->name); 278 278 if (nomap) 279 - memblock_add(rmem->base, rmem->size); 279 + memblock_clear_nomap(rmem->base, rmem->size); 280 280 else 281 281 memblock_free(rmem->base, rmem->size); 282 282 }