when early_param("string", function_name) will be called?

Dave Hylands dhylands at gmail.com
Tue Jul 26 13:40:44 EDT 2011


Hi sandeep,

On Tue, Jul 26, 2011 at 2:05 AM, sandeep kumar
<coolsandyforyou at gmail.com> wrote:
> Hi all,
>
> In kernel code at lot of places i came across
> "early_param("string", function_name)"
>
> Eg: early_param("vmalloc", early_vmalloc); in arch/arm/mm/mmu.c
>
> when this function will be called? and what is the significance of the
> string "vmalloc" there?

This function is called from here:
http://lxr.linux.no/linux+v3.0/init/main.c#L378

In particular, it looks for the string "vmalloc" on the kernel command
line, and if it finds it, then it will call early_vmalloc.

early_params are processed early in the boot process, at a time when
most services haven't yet been initialized.
http://lxr.linux.no/linux+v3.0/Documentation/driver-model/platform.txt#L173

Most of the kernel command line options are documented here:
http://lxr.linux.no/linux+v3.0/Documentation/kernel-parameters.txt

with vmalloc in particular being here:
http://lxr.linux.no/linux+v3.0/Documentation/kernel-parameters.txt#L2645

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com



More information about the Kernelnewbies mailing list