• Baoquan He's avatar
    crash_core: move crashk_*res definition into crash_core.c · b631b95d
    Baoquan He authored
    Both crashk_res and crashk_low_res are used to mark the reserved
    crashkernel regions in iomem_resource tree.  And later the generic
    crashkernel resrvation will be added into crash_core.c.  So move
    crashk_res and crashk_low_res definition into crash_core.c to avoid
    compiling error if CONFIG_CRASH_CORE=on while CONFIG_KEXEC_CORE is unset.
    
    Meanwhile include <asm/crash_core.h> in <linux/crash_core.h> if generic
    reservation is needed.  In that case, <asm/crash_core.h> need be added by
    ARCH.  In asm/crash_core.h, ARCH can provide its own macro definitions to
    override macros in <linux/crash_core.h> if needed.  Wrap the including
    into CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION ifdeffery scope to
    avoid compiling error in other ARCH-es which don't take the generic
    reservation way yet.
    
    Link: https://lkml.kernel.org/r/20230914033142.676708-6-bhe@redhat.comSigned-off-by: default avatarBaoquan He <bhe@redhat.com>
    Reviewed-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Chen Jiahao <chenjiahao16@huawei.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    b631b95d
crash_core.c 28.1 KB