Re: [PATCH 13/13] memblock, x86: Replace memblock_x86_reserve/free_range()with generic ones

From: Yinghai Lu
Date: Tue Jul 26 2011 - 17:06:48 EST


On Tue, Jul 12, 2011 at 2:16 AM, Tejun Heo <tj@xxxxxxxxxx> wrote:
> Other than sanity check and debug message, the x86 specific version of
> memblock reserve/free functions are simple wrappers around the generic
> versions - memblock_reserve/free().
>
> This patch adds debug messages with caller identification to the
> generic versions and replaces x86 specific ones and kills them.
> arch/x86/include/asm/memblock.h and arch/x86/mm/memblock.c are empty
> after this change and removed.
>
...
> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> index 5636308..6e76c19 100644
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -94,7 +94,7 @@ static u32 __init allocate_aperture(void)
> addr, aper_size>>10);
> return 0;
> }
> - memblock_x86_reserve_range(addr, addr + aper_size, "aperture64");
> + memblock_reserve(addr, aper_size);

Wonder if we have a new function like

__memblock_reserve(addr, size, name)

in mm/memblock.c

so could keep string for debug purpose instead of using _RET_IP_.

with that, we can figure out what is in exact reserved position with boot log.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/