@@ -11,6 +11,9 @@ source "arch/$(SRCARCH)/Kconfig"
menu "General architecture-dependent options"
+config ARCH_WANT_RESERVE_CRASH_KERNEL
+ bool
+
config CRASH_CORE
bool
@@ -12,6 +12,7 @@ config X86_32
depends on !64BIT
# Options that are inherently 32-bit kernel only:
select ARCH_WANT_IPC_PARSE_VERSION
+ select ARCH_WANT_RESERVE_CRASH_KERNEL if KEXEC_CORE
select CLKSRC_I8253
select CLONE_BACKWARDS
select GENERIC_VDSO_32
@@ -28,6 +29,7 @@ config X86_64
select ARCH_HAS_GIGANTIC_PAGE
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select ARCH_USE_CMPXCHG_LOCKREF
+ select ARCH_WANT_RESERVE_CRASH_KERNEL if KEXEC_CORE
select HAVE_ARCH_SOFT_DIRTY
select MODULES_USE_ELF_RELA
select NEED_DMA_MAP_STATE
@@ -390,9 +390,9 @@ static void __init memblock_x86_reserve_range_setup_data(void)
* --------- Crashkernel reservation ------------------------------
*/
-#ifdef CONFIG_KEXEC_CORE
+#ifdef CONFIG_ARCH_WANT_RESERVE_CRASH_KERNEL
-#ifdef CONFIG_X86_64
+#ifdef CONFIG_64BIT
static int __init reserve_crashkernel_low(unsigned long long low_size)
{
unsigned long long low_base = 0;
@@ -456,7 +456,7 @@ static int __init parse_crashkernel_in_order(char *cmdline,
if (!ret && crash_size > 0)
return CRASHKERNEL_MEM_CLASSIC;
-#ifdef CONFIG_X86_64
+#ifdef CONFIG_64BIT
/* crashkernel=X,high */
ret = parse_crashkernel_high(cmdline, system_ram, crash_size, crash_base);
if (ret || crash_size <= 0)
@@ -522,7 +522,7 @@ static void __init reserve_crashkernel(void)
}
}
-#ifdef CONFIG_X86_64
+#ifdef CONFIG_64BIT
if (crash_base >= CRASH_ADDR_LOW_MAX) {
/*
* Ensure that at least 256M extra low memory is allocated for
@@ -556,7 +556,7 @@ static void __init reserve_crashkernel(void)
crashk_res.start = crash_base;
crashk_res.end = crash_base + crash_size - 1;
}
-#endif
+#endif /* CONFIG_ARCH_WANT_RESERVE_CRASH_KERNEL */
static struct resource standard_io_resources[] = {
{ .name = "dma1", .start = 0x00, .end = 0x1f,