I found another bug, that even for early section, when vmemmap_populate is called, SECTION_IS_EARLY is not set. Therefore, early_section() always return false.Hmm, well that's unexpected.
Since vmemmap_populate() occurs during section initialization, it may be hard to say it is a bug..But from a semantics perspective, should SECTION_MARKED_PRESENT be marked on a
However, should we instead using SECTION_MARKED_PRESENT to check? I tested well in my setup.
Hot plug flow:
1. section_activate -> vmemmap_populate
2. mark PRESENT
In contrast, the early flow:
1. memblocks_present -> mark PRESENT
2. __populate_section_memmap -> vmemmap_populate
section before SECTION_IS_EARLY ? Is it really the expected behaviour here or
that needs to be fixed first ?
Although SYSTEM_BOOTING state check might help but section flag seems to be the
right thing to do here.