Re: [PATCH v2 1/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

From: Steven Rostedt
Date: Wed Jun 12 2024 - 11:29:03 EST


On Wed, 12 Jun 2024 07:30:49 +0000
Wei Yang <richard.weiyang@xxxxxxxxx> wrote:

> >+/* Add wildcard region with a lookup name */
> >+static int __init reserved_mem_add(unsigned long start, unsigned long size,
> >+ const char *name)
> >+{
> >+ struct reserve_mem_table *map;
> >+
> >+ if (!name || !name[0] || strlen(name) >= RESERVE_MEM_NAME_SIZE)
> >+ return -EINVAL;
> >+
> >+ if (reserved_mem_count >= RESERVE_MEM_MAX_ENTRIES)
> >+ return -1;
>
> Another thing come to my mind: could we specify several reserve_mem on the
> command line?

Yes, in fact I have this on my command line that I test with:

reserve_mem=2M:0:oops ramoops.mem_name=oops ramoops.console_size=0x100000 reserve_mem=12M:4096:trace trace_instance=boot_mapped@trace


>
> If so, we may need to check whether names conflict.

Yeah, I can add that.

Thanks,

-- Steve