[PATCH 1/3] riscv: mm: Rename new_vmalloc into new_valid_map_cpus

Alexander Potapenko glider at google.com
Mon Mar 2 07:41:05 PST 2026


On Mon, Mar 2, 2026 at 3:21 AM Vivian Wang <wangruikang at iscas.ac.cn> wrote:
>
> In preparation of a future patch using this mechanism for non-vmalloc
> mappings, rename new_vmalloc into new_valid_map_cpus to avoid misleading
> readers.
>
> No functional change intended.
>
> Signed-off-by: Vivian Wang <wangruikang at iscas.ac.cn>
> ---
>  arch/riscv/include/asm/cacheflush.h |  6 +++---
>  arch/riscv/kernel/entry.S           | 38 ++++++++++++++++++-------------------
>  arch/riscv/mm/init.c                |  2 +-
>  3 files changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/arch/riscv/include/asm/cacheflush.h b/arch/riscv/include/asm/cacheflush.h
> index 0092513c3376..b6d1a5eb7564 100644
> --- a/arch/riscv/include/asm/cacheflush.h
> +++ b/arch/riscv/include/asm/cacheflush.h
> @@ -41,7 +41,7 @@ do {                                                  \
>  } while (0)
>
>  #ifdef CONFIG_64BIT
> -extern u64 new_vmalloc[NR_CPUS / sizeof(u64) + 1];
> +extern u64 new_valid_map_cpus[NR_CPUS / sizeof(u64) + 1];

new_valid_map_cpus is a bitmap, right? If so, you are allocating 8x
more memory than needed.
Can we use DECLARE_BITMAP instead?



More information about the linux-riscv mailing list