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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 11, 2024 at 11:12:18AM -0400, Steven Rostedt wrote:
> On Tue, 11 Jun 2024 14:40:29 +0000
> Wei Yang <richard.weiyang@xxxxxxxxx> wrote:
> 
> > >+
> > >+	align = memparse(p+1, &p);
> > >+	if (*p != ':')
> > >+		return -EINVAL;
> > >+  
> >
> > Make sure command line parameters are valid before doing the allocation.
> 
> You mean that size is non zero?
> 
> I don't know if we care what the align is. Zero is valid.

memblock won't like zero align, it should be SMP_CACHE_BYTES at least.
No point requiring it from user, just update the alignment if the user passed
zero.
 
> > >+	start = memblock_phys_alloc(size, align);
> > >+	if (!start)
> > >+		return -ENOMEM;
> > >+

-- 
Sincerely yours,
Mike.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux