Message ID | 1607343702-28318-1-git-send-email-yangtiezhu@loongson.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | a8c0f1c634507a36ef87a23cfd93720f6142ad9a |
Headers | show |
Series | [v2] MIPS: Select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to enable sysfs memblock debug | expand |
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@loongson.cn> > --- > > v2: > - select ARCH_KEEP_MEMBLOCK only if DEBUG_KERNEL > > arch/mips/Kconfig | 1 + > 1 file changed, 1 insertion(+) applied to mips-next. Thomas.
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index b49a390..85c7b06 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -10,6 +10,7 @@ config MIPS select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_UBSAN_SANITIZE_ALL select ARCH_HAS_GCOV_PROFILE_ALL + select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL select ARCH_SUPPORTS_UPROBES select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
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@loongson.cn> --- v2: - select ARCH_KEEP_MEMBLOCK only if DEBUG_KERNEL arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+)