[PATCH 1/1] riscv: select CONFIG_ARCH_KEEP_MEMBLOCK

Kefeng Wang wangkefeng.wang at huawei.com
Mon Aug 16 08:30:28 PDT 2021


On 2021/8/16 22:47, Heinrich Schuchardt wrote:
> For analyzing memory blocks we can either use the memblock=debug command
> line argument which creates massive output or a debug file system.
>
> Select CONFIG_ARCH_KEEP_MEMBLOCK to provide a debugfs at
> /sys/kernel/debug/memblock to analyze memory blocks. The
> same is already done for arm, arm64, mips, powerpc.
>
> The actual provisioning of the file system depends on CONFIG_DEBUG_FS.

Hi,for riscv, it don't use memblock(eg, no provide pfn_valid to use 
memblock),

we could call memblock_discard() to discard memblock private memory to save

some memory, right?  So I think we don't need this config for now.

>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>   arch/riscv/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 4f7b70ae7c31..a6e57614c3fd 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -31,6 +31,7 @@ config RISCV
>   	select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
>   	select ARCH_HAS_STRICT_MODULE_RWX if MMU && !XIP_KERNEL
>   	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
> +	select ARCH_KEEP_MEMBLOCK
>   	select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
>   	select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
>   	select ARCH_SUPPORTS_HUGETLBFS if MMU



More information about the linux-riscv mailing list