crash_debug ?= n
frame_pointer ?= n
lto ?= n
+kexec ?= y
include $(XEN_ROOT)/Config.mk
CFLAGS-y += -DMAX_PHYS_IRQS=$(max_phys_irqs)
endif
+CONFIG_KEXEC-$(HAS_KEXEC) := $(kexec)
+CONFIG_KEXEC := $(CONFIG_KEXEC-y)
+
+CFLAGS-$(CONFIG_KEXEC) += -DCONFIG_KEXEC
+
AFLAGS-y += -D__ASSEMBLY__ -include $(BASEDIR)/include/xen/config.h
# Clang's built-in assembler can't handle .code16/.code32/.code64 yet
obj-bin-y += clear_page.o
obj-bin-y += copy_page.o
obj-y += compat.o
+obj-$(CONFIG_KEXEC) += crash.o
obj-y += debug.o
obj-y += delay.o
obj-bin-y += dmi_scan.init.o
obj-y += msi.o
obj-y += ioport_emulate.o
obj-y += irq.o
+obj-$(CONFIG_KEXEC) += machine_kexec.o
obj-y += microcode_amd.o
obj-y += microcode_intel.o
# This must come after the vendor specific files.
obj-y += traps.o
obj-y += usercopy.o
obj-y += x86_emulate.o
-obj-y += machine_kexec.o
-obj-y += crash.o
obj-y += tboot.o
obj-y += hpet.o
obj-y += vm_event.o
static void __init kexec_reserve_area(struct e820map *e820)
{
+#ifdef CONFIG_KEXEC
unsigned long kdump_start = kexec_crash_area.start;
unsigned long kdump_size = kexec_crash_area.size;
static bool_t __initdata is_reserved = 0;
printk("Kdump: %luMB (%lukB) at %#lx\n",
kdump_size >> 20, kdump_size >> 10, kdump_start);
}
+#endif
}
static void noinline init_done(void)
}
}
+#ifdef CONFIG_KEXEC
/* Don't overlap with modules. */
e = consider_modules(s, e, PAGE_ALIGN(kexec_crash_area.size),
mod, mbi->mods_count, -1);
e = (e - kexec_crash_area.size) & PAGE_MASK;
kexec_crash_area.start = e;
}
+#endif
}
if ( modules_headroom && !mod->reserved )
PFN_UP(mod[i].mod_end), PAGE_HYPERVISOR);
}
+#ifdef CONFIG_KEXEC
if ( kexec_crash_area.size )
{
unsigned long s = PFN_DOWN(kexec_crash_area.start);
map_pages_to_xen((unsigned long)__va(kexec_crash_area.start),
s, e - s, PAGE_HYPERVISOR);
}
+#endif
xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) &
~((1UL << L2_PAGETABLE_SHIFT) - 1);
.section .rodata, "a", @progbits
+#ifndef CONFIG_KEXEC
+#define compat_kexec_op do_ni_hypercall
+#endif
+
ENTRY(compat_hypercall_table)
.quad compat_set_trap_table /* 0 */
.quad do_mmu_update
.endr
.size exception_table, . - exception_table
+#ifndef CONFIG_KEXEC
+#define do_kexec_op do_ni_hypercall
+#endif
+
ENTRY(hypercall_table)
.quad do_set_trap_table /* 0 */
.quad do_mmu_update
obj-y += irq.o
obj-y += kernel.o
obj-y += keyhandler.o
-obj-$(HAS_KEXEC) += kexec.o
-obj-$(HAS_KEXEC) += kimage.o
+obj-$(CONFIG_KEXEC) += kexec.o
+obj-$(CONFIG_KEXEC) += kimage.o
obj-y += lib.o
obj-y += lzo.o
obj-$(HAS_MEM_ACCESS) += mem_access.o
#define CONFIG_HOTPLUG_CPU 1
#define CONFIG_XENOPROF 1
-#define CONFIG_KEXEC 1
#define CONFIG_WATCHDOG 1
#define CONFIG_MULTIBOOT 1
#else /* !CONFIG_KEXEC */
#define crashinfo_maxaddr_bits 0
+#define kexecing 0
+
+static inline void kexec_early_calculations(void) {}
+static inline void kexec_crash(void) {}
+static inline void kexec_crash_save_cpu(void) {}
+static inline void set_kexec_crash_area_size(u64 system_ram) {}
#endif