[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110920131952.GA28830@redhat.com>
Date: Tue, 20 Sep 2011 09:19:52 -0400
From: Vivek Goyal <vgoyal@...hat.com>
To: Michael Holzheu <holzheu@...ux.vnet.ibm.com>
Cc: ebiederm@...ssion.com, mahesh@...ux.vnet.ibm.com,
schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-s390@...r.kernel.org
Subject: Re: [patch 1/2] kdump: Initialize vmcoreinfo note at startup
On Fri, Sep 09, 2011 at 12:27:00PM +0200, Michael Holzheu wrote:
> From: Michael Holzheu <holzheu@...ux.vnet.ibm.com>
>
> Currently the vmcoreinfo note is only initialized in case of kdump. On s390
> it is possible to create kernel dumps with other dump mechanisms than kdump
> (e.g. via hypervisor dump or stand-alone dump tools). For those dumps it
> would also be desirable to include the vmcoreinfo data. To accomplish this,
> with this patch the vmcoreinfo ELF note is always initialized, not only in
> case of a (kdump) crash. On s390 we will add an ABI defined pointer at
> a well known address to vmcoreinfo so that dump analysis tools are able to
> find this information.
>
> Signed-off-by: Michael Holzheu <holzheu@...ux.vnet.ibm.com>
Looks good to me.
Acked-by: Vivek Goyal <vgoyal@...hat.com>
> ---
> kernel/kexec.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -1392,24 +1392,23 @@ int __init parse_crashkernel(char *cm
> }
>
>
> -
> -void crash_save_vmcoreinfo(void)
> +static void update_vmcoreinfo_note(void)
> {
> - u32 *buf;
> + u32 *buf = (u32 *) vmcoreinfo_note;
>
> if (!vmcoreinfo_size)
> return;
> -
> - vmcoreinfo_append_str("CRASHTIME=%ld", get_seconds());
> -
> - buf = (u32 *)vmcoreinfo_note;
> -
> buf = append_elf_note(buf, VMCOREINFO_NOTE_NAME, 0, vmcoreinfo_data,
> vmcoreinfo_size);
> -
> final_note(buf);
> }
>
> +void crash_save_vmcoreinfo(void)
> +{
> + vmcoreinfo_append_str("CRASHTIME=%ld", get_seconds());
> + update_vmcoreinfo_note();
> +}
> +
> void vmcoreinfo_append_str(const char *fmt, ...)
> {
> va_list args;
> @@ -1495,6 +1494,7 @@ static int __init crash_save_vmcoreinfo_
> VMCOREINFO_NUMBER(PG_swapcache);
>
> arch_crash_save_vmcoreinfo();
> + update_vmcoreinfo_note();
>
> return 0;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists