On Fri, Sep 12, 2014 at 11:17:18AM +0100, Wang, Yalin wrote: > this patch fix the memblock statics for memblock > in file /sys/kernel/debug/memblock/reserved > if we don't call memblock_free the initrd will still > be marked as reserved, even they are freed. > > Signed-off-by: Yalin Wang <yalin.wang@xxxxxxxxxxxxxx> > --- > arch/arm64/mm/init.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index 5472c24..34605c8 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -334,8 +334,10 @@ static int keep_initrd; > > void free_initrd_mem(unsigned long start, unsigned long end) > { > - if (!keep_initrd) > + if (!keep_initrd) { > free_reserved_area((void *)start, (void *)end, 0, "initrd"); > + memblock_free(__pa(start), end - start); > + } I don't think it makes any technical difference, but doing the memblock_free before the free_reserved_area makes more sense to me. Will -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>