Hello,

Serge Semin wrote:
> Before bootmem was completely removed from the kernel, the last loop
> in the bootmem_init() had been used to reserve the correspondingly
> marked regions, initialize sparsemem sections and to free the low memory
> pages, which then would be used for early memory allocations. After the
> bootmem removing patchset had been merged the loop was left to do the first
> two things only. But it didn't do them quite well.
> 
> First of all it leaves the BOOT_MEM_INIT_RAM memory types unreserved,
> which is definitely bug (although it isn't noticeable due to being used
> by the kernel region only, which is fully marked as reserved). Secondly
> the reservation is supposed to be done for any memory including the
> high one. (I couldn't figure out why the highmem was ignored in the first
> place, since platforms and dts' may declare any memory region for
> reservation) Thirdly the reserved_end variable had been used here to not
> accidentally free memory occupied by kernel. Since we already reserved the
> corresponding region higher in this method there is no need in using the
> variable here anymore. Fourthly the sparsemem should be aware of all the
> memory types in the system including the ROM_DATA even if it is going to
> be reserved for the whole system uptime. Finally after all these notes are
> fixed the loop of memory reservation can be freely merged into the memory
> installation loop as it's done in this patch.
> 
> Signed-off-by: Serge Semin <fancer.lan...@gmail.com>

Applied to mips-next.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.bur...@mips.com to report it. ]

Reply via email to