Re: [PATCHv2 1/7] x86/mm: concentrate the code to memblock allocator enabled

From: Pingfan Liu
Date: Tue Jan 15 2019 - 02:06:28 EST


On Tue, Jan 15, 2019 at 7:07 AM Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>
> On 1/10/19 9:12 PM, Pingfan Liu wrote:
> > This patch identifies the point where memblock alloc start. It has no
> > functional.
>
> It has no functional ... what? Effects?
>
During re-organize the code, it takes me a long time to figure out why
memblock_set_bottom_up(true) is added here, and how far can it be
deferred. And finally, I realize that it only takes effect after
e820__memblock_setup(), the point where memblock allocator can work.
So I concentrate the related code, and hope this patch can classify
this truth.

> > - memblock_set_current_limit(ISA_END_ADDRESS);
> > - e820__memblock_setup();
> > -
> > reserve_bios_regions();
> >
> > if (efi_enabled(EFI_MEMMAP)) {
> > @@ -1113,6 +1087,8 @@ void __init setup_arch(char **cmdline_p)
> > efi_reserve_boot_services();
> > }
> >
> > + memblock_set_current_limit(0, ISA_END_ADDRESS, false);
> > + e820__memblock_setup();
>
> It looks like you changed the arguments passed to
> memblock_set_current_limit(). How can this even compile? Did you mean
> that this patch is not functional?
>
Sorry that during rebasing, merge trivial fix by mistake. I will build
against each patch.

Best regards,
Pingfan