]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[S390] Export vmcoreinfo note
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Mon, 26 Sep 2011 14:42:49 +0000 (16:42 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 26 Sep 2011 14:42:47 +0000 (16:42 +0200)
This patch defines for s390 an ABI defined pointer to the vmcoreinfo note at
a well known address. With this patch tools are able to find this information
in dumps created by stand-alone or hypervisor dump tools.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/lowcore.h
arch/s390/kernel/setup.c

index e85c911aabf04d4660059900fba13dd75e269cb4..4f990a5e5b59263bc7a874966eea313a93557334 100644 (file)
@@ -151,10 +151,11 @@ struct _lowcore {
         */
        __u32   ipib;                           /* 0x0e00 */
        __u32   ipib_checksum;                  /* 0x0e04 */
+       __u32   vmcore_info;                    /* 0x0e08 */
 
        /* 64 bit save area */
-       __u64   save_area_64;                   /* 0x0e08 */
-       __u8    pad_0x0e10[0x0f00-0x0e10];      /* 0x0e10 */
+       __u64   save_area_64;                   /* 0x0e0c */
+       __u8    pad_0x0e14[0x0f00-0x0e14];      /* 0x0e14 */
 
        /* Extended facility list */
        __u64   stfle_fac_list[32];             /* 0x0f00 */
@@ -290,10 +291,11 @@ struct _lowcore {
         */
        __u64   ipib;                           /* 0x0e00 */
        __u32   ipib_checksum;                  /* 0x0e08 */
+       __u64   vmcore_info;                    /* 0x0e0c */
 
        /* 64 bit save area */
-       __u64   save_area_64;                   /* 0x0e0c */
-       __u8    pad_0x0e14[0x0f00-0x0e14];      /* 0x0e14 */
+       __u64   save_area_64;                   /* 0x0e14 */
+       __u8    pad_0x0e1c[0x0f00-0x0e1c];      /* 0x0e1c */
 
        /* Extended facility list */
        __u64   stfle_fac_list[32];             /* 0x0f00 */
index 9d9ba728cda174ec1ded6d5964428bb98b54ce2a..8272da1379ea7c99f8dee8a26c13d3a66018f3b3 100644 (file)
@@ -558,6 +558,15 @@ static void __init setup_restart_psw(void)
        copy_to_absolute_zero(&S390_lowcore.restart_psw, &psw, sizeof(psw));
 }
 
+static void __init setup_vmcoreinfo(void)
+{
+#ifdef CONFIG_KEXEC
+       unsigned long ptr = paddr_vmcoreinfo_note();
+
+       copy_to_absolute_zero(&S390_lowcore.vmcore_info, &ptr, sizeof(ptr));
+#endif
+}
+
 #ifdef CONFIG_CRASH_DUMP
 
 /*
@@ -1022,6 +1031,7 @@ setup_arch(char **cmdline_p)
        reserve_crashkernel();
        setup_memory();
        setup_resources();
+       setup_vmcoreinfo();
        setup_restart_psw();
        setup_lowcore();