x86/kexec: hide more kexec infrastructure behind CONFIG_KEXEC
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 24 Nov 2015 16:41:04 +0000 (17:41 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 24 Nov 2015 16:41:04 +0000 (17:41 +0100)
Experimenting with the kconfig series showed that various bits of kexec
infrastructure were still being unconditionally included.  Make them
conditional on CONFIG_KEXEC.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
xen/arch/x86/x86_64/Makefile
xen/arch/x86/xen.lds.S

index d5af7224212cb93b4da04448b812de83d6c2002b..5b54c16d095838badd6502846742924faaa0a289 100644 (file)
@@ -3,7 +3,7 @@ subdir-y += compat
 obj-bin-y += entry.o
 obj-bin-y += gpr_switch.o
 obj-y += traps.o
-obj-y += machine_kexec.o
+obj-$(CONFIG_KEXEC) += machine_kexec.o
 obj-y += pci.o
 obj-y += acpi_mmcfg.o
 obj-y += mmconf-fam10h.o
@@ -12,6 +12,6 @@ obj-y += mmconfig-shared.o
 obj-y += domain.o
 obj-y += cpu_idle.o
 obj-y += cpufreq.o
-obj-bin-y += kexec_reloc.o
+obj-bin-$(CONFIG_KEXEC) += kexec_reloc.o
 
 obj-$(crash_debug)   += gdbstub.o
index 6553cff56f03066037ca7e2b02574df7db70516b..e18e08fc5a1f4ea755d9323449716ea28a283727 100644 (file)
@@ -220,5 +220,9 @@ SECTIONS
 ASSERT(__image_base__ > XEN_VIRT_START ||
        _end <= XEN_VIRT_END - NR_CPUS * PAGE_SIZE,
        "Xen image overlaps stubs area")
+
+#ifdef CONFIG_KEXEC
 ASSERT(kexec_reloc_size - kexec_reloc <= PAGE_SIZE, "kexec_reloc is too large")
+#endif
+
 ASSERT((cpu0_stack & (STACK_SIZE - 1)) == 0, "cpu0_stack misaligned")