Re: [PATCH v2 1/7] cmdline: Add generic function to build command line.

From: Segher Boessenkool
Date: Fri Mar 05 2021 - 13:43:31 EST


On Fri, Mar 05, 2021 at 01:49:03PM +0100, Christophe Leroy wrote:
> Le 05/03/2021 à 12:58, Michael Ellerman a écrit :
> >prom_init runs as an OF client, with the MMU off (except on some Apple
> >machines), and we don't own the MMU. So there's really nothing we can do :)
> >
> >Though now that I look at it, I don't think we should be doing this
> >level of commandline handling in prom_init. It should just grab the
> >value from firmware and pass it to the kernel proper, and then all the
> >prepend/append/force etc. logic should happen there.
>
> But then, how do you handle the command line parameters that are needed by
> prom_init ?
>
> For instance, prom_init_mem() use 'prom_memory_limit', which comes from the
> "mem=" option in the command line.

*Reading* it is easy, much easier than modifying it.


Segher