Commit 197725de65477bc8509b41388157c1a2283542bb

Authored by H. Peter Anvin
1 parent 20b68535cd

x86, espfix: Make espfix64 a Kconfig option, fix UML

Make espfix64 a hidden Kconfig option.  This fixes the x86-64 UML
build which had broken due to the non-existence of init_espfix_bsp()
in UML: since UML uses its own Kconfig, this option does not appear in
the UML build.

This also makes it possible to make support for 16-bit segments a
configuration option, for the people who want to minimize the size of
the kernel.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Richard Weinberger <richard@nod.at>
Link: http://lkml.kernel.org/r/1398816946-3351-1-git-send-email-hpa@linux.intel.com

Showing 4 changed files with 7 additions and 3 deletions Side-by-side Diff

... ... @@ -914,6 +914,10 @@
914 914 XFree86 to initialize some video cards via BIOS. Disabling this
915 915 option saves about 6k.
916 916  
  917 +config X86_ESPFIX64
  918 + def_bool y
  919 + depends on X86_64
  920 +
917 921 config TOSHIBA
918 922 tristate "Toshiba Laptop support"
919 923 depends on X86_32
arch/x86/kernel/Makefile
... ... @@ -29,7 +29,7 @@
29 29 obj-y += syscall_$(BITS).o vsyscall_gtod.o
30 30 obj-$(CONFIG_X86_64) += vsyscall_64.o
31 31 obj-$(CONFIG_X86_64) += vsyscall_emu_64.o
32   -obj-$(CONFIG_X86_64) += espfix_64.o
  32 +obj-$(CONFIG_X86_ESPFIX64) += espfix_64.o
33 33 obj-$(CONFIG_SYSFS) += ksysfs.o
34 34 obj-y += bootflag.o e820.o
35 35 obj-y += pci-dma.o quirks.o topology.o kdebugfs.o
arch/x86/kernel/smpboot.c
... ... @@ -246,7 +246,7 @@
246 246 /*
247 247 * Enable the espfix hack for this CPU
248 248 */
249   -#ifdef CONFIG_X86_64
  249 +#ifdef CONFIG_X86_ESPFIX64
250 250 init_espfix_ap();
251 251 #endif
252 252  
... ... @@ -617,7 +617,7 @@
617 617 if (efi_enabled(EFI_RUNTIME_SERVICES))
618 618 efi_enter_virtual_mode();
619 619 #endif
620   -#ifdef CONFIG_X86_64
  620 +#ifdef CONFIG_X86_ESPFIX64
621 621 /* Should be run before the first non-init thread is created */
622 622 init_espfix_bsp();
623 623 #endif