diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 56f664561754..1825a62df3ba 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -174,8 +174,16 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys) void *dt_virt = fixmap_remap_fdt(dt_phys, &size, PAGE_KERNEL); const char *name; - if (dt_virt) + if (dt_virt) { memblock_reserve(dt_phys, size); + /* + * memblock_dbg is not up because of parse_early_param + * get called after setup_machine_fd. To capture fdt + * reserved info below pr_info is added. + */ + pr_info("memblock_reserve: 0x%x %pS\n", size - 1, + (void *) _RET_IP_); + } if (!dt_virt || !early_init_dt_scan(dt_virt)) { pr_crit("\n" diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 480b43d685e5..12ca19b055bf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7665,6 +7665,11 @@ unsigned long free_reserved_area(void *start, void *end, int poison, const char pr_info("Freeing %s memory: %ldK\n", s, pages << (PAGE_SHIFT - 10)); +#ifdef CONFIG_HAVE_MEMBLOCK + memblock_dbg("memblock_free: [%#016llx-%#016llx] %pS\n", + __pa(start), __pa(end), (void *)_RET_IP_); +#endif + return pages; } EXPORT_SYMBOL_GPL(free_reserved_area);