[lkml]   [2012]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[046/129] include/linux/crash_dump.h needs elf.h
    3.2-stable review patch.  If anyone has any objections, please let me know.

    Content-Length: 1577
    Lines: 48

    From: Fabio Estevam <>

    commit 1f536b9e9f85456df93614b3c2f6a1a2b7d7cb9b upstream.

    Building an ARM target we get the following warnings:

    CC arch/arm/kernel/setup.o
    In file included from arch/arm/kernel/setup.c:39:
    arch/arm/include/asm/elf.h:102:1: warning: "vmcore_elf64_check_arch" redefined
    In file included from arch/arm/kernel/setup.c:24:
    include/linux/crash_dump.h:30:1: warning: this is the location of the previous definition

    Quoting Russell King:

    "linux/crash_dump.h makes no attempt to include asm/elf.h, but it depends
    on stuff in asm/elf.h to determine how stuff inside this file is defined
    at parse time.

    So, if asm/elf.h is included after linux/crash_dump.h or not at all, you
    get a different result from the situation where asm/elf.h is included

    So add elf.h header to crash_dump.h to avoid this problem.

    The original discussion about this can be found at:

    Signed-off-by: Fabio Estevam <>
    Cc: Russell King <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
    Signed-off-by: Greg Kroah-Hartman <>

    include/linux/crash_dump.h | 1 +
    1 file changed, 1 insertion(+)

    --- a/include/linux/crash_dump.h
    +++ b/include/linux/crash_dump.h
    @@ -5,6 +5,7 @@
    #include <linux/kexec.h>
    #include <linux/device.h>
    #include <linux/proc_fs.h>
    +#include <linux/elf.h>

    #define ELFCORE_ADDR_MAX (-1ULL)
    #define ELFCORE_ADDR_ERR (-2ULL)

     \ /
      Last update: 2012-01-24 04:05    [W:0.020 / U:3.832 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site