Re: [PATCH v2] MIPS: Select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to enable sysfs memblock debug

From: Thomas Bogendoerfer
Date: Mon Dec 14 2020 - 10:28:50 EST


On Mon, Dec 07, 2020 at 08:21:42PM +0800, Tiezhu Yang wrote:
> In the current code, CONFIG_ARCH_KEEP_MEMBLOCK is not set for MIPS arch,
> memblock_discard() will discard memory and reserved arrays if they were
> allocated, select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to give a chance to
> track "memory" and "reserved" memblocks after early boot, with this patch,
> we can see the following two sysfs interfaces under DEBUG_FS.
>
> /sys/kernel/debug/memblock/memory
> /sys/kernel/debug/memblock/reserved
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
> ---
>
> v2:
> - select ARCH_KEEP_MEMBLOCK only if DEBUG_KERNEL
>
> arch/mips/Kconfig | 1 +
> 1 file changed, 1 insertion(+)

applied to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]