lkml.org 
[lkml]   [2007]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 1/7] Extended crashkernel command line
    On Thu, 13 Sep 2007 18:14:29 +0200
    Bernhard Walle <bwalle@suse.de> wrote:

    > This is the generic part of the patch. It adds a parse_crashkernel() function
    > in kernel/kexec.c that is called by the architecture specific code that
    > actually reserves the memory. That function takes the whole command line and
    > looks itself for "crashkernel=" in it.
    >
    > If there are multiple occurrences, then the last one is taken. The advantage
    > is that if you have a bootloader like lilo or elilo which allows you to append
    > a command line parameter but not to remove one (like in GRUB), then you can add
    > another crashkernel value for testing at the boot command line and this one
    > overwrites the command line in the configuration then.
    >
    >
    > Signed-off-by: Bernhard Walle <bwalle@suse.de>
    >
    > ---
    > include/linux/kexec.h | 2
    > kernel/kexec.c | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++
    > 2 files changed, 141 insertions(+)
    >
    > --- a/include/linux/kexec.h
    > +++ b/include/linux/kexec.h
    > @@ -179,6 +179,8 @@ extern note_buf_t *crash_notes;
    > extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4];
    > extern unsigned int vmcoreinfo_size;
    > extern unsigned int vmcoreinfo_max_size;
    > +int parse_crashkernel(char *cmdline, unsigned long long system_ram,
    > + unsigned long long *crash_size, unsigned long long *crash_base);
    >
    >
    > #else /* !CONFIG_KEXEC */
    > --- a/kernel/kexec.c
    > +++ b/kernel/kexec.c
    > @@ -1146,6 +1146,145 @@ static int __init crash_notes_memory_ini
    > }
    > module_init(crash_notes_memory_init)
    >
    > +
    > +/*
    > + * parsing the "crashkernel" commandline
    > + *
    > + * this code is intended to be called from architecture specific code
    > + */
    > +
    > +
    > +/*
    > + * This function parses command lines in the format
    > + *
    > + * crashkernel=<ramsize-range>:<size>[,...][@<base>]
    > + *
    > + * The function returns 0 on success and -EINVAL on failure.
    > + */
    > +static int parse_crashkernel_mem(char *cmdline,
    > + unsigned long long *crash_size,
    > + unsigned long long *crash_base,
    > + unsigned long system_ram)
    > +{

    The patchset seems to be putting a large amount of stuff into .text
    which could have gone into .text.init?
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-09-20 00:35    [W:0.027 / U:60.660 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site