Skip to contentSkip to conversation

x86/kexec: Hide more kexec infrastructure behind CONFIG_KEXEC

PATCH In review Andrew Cooper 2 participants 2 messages Nov 24, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/kexec: Hide more kexec infrastructure behind CONFIG_KEXEC

Experimenting with the kconfig series showed that various bits of kexec infrastructure were still being unconditionally included. Make them conditional on CONFIG_KEXEC.

---
CC: Jan Beulich <[email protected]>
CC: David Vrabel <[email protected]>
CC: Doug Goldstein <[email protected]>

This patch is independent of the kconfig series.

---
 xen/arch/x86/x86_64/Makefile | 4 ++--
 xen/arch/x86/xen.lds.S       | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)
xen/arch/x86/x86_64/Makefile +2 -2
index d5af722..5b54c16 100644
@@ -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
xen/arch/x86/xen.lds.S +4 -0
index 6553cff..e18e08f 100644
@@ -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")
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Andrew Cooper

Experimenting with the kconfig series showed that various bits of kexec infrastructure were still being unconditionally included. Make them conditional on CONFIG_KEXEC.

David