aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/Makefile3
-rw-r--r--arch/i386/kernel/cpu/common.c2
-rw-r--r--init/Kconfig9
3 files changed, 13 insertions, 1 deletions
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index f10de0f2c5e..4f40589e179 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds
7obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ 7obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
8 ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ 8 ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
9 pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ 9 pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \
10 doublefault.o quirks.o i8237.o 10 quirks.o i8237.o
11 11
12obj-y += cpu/ 12obj-y += cpu/
13obj-y += timers/ 13obj-y += timers/
@@ -33,6 +33,7 @@ obj-y += sysenter.o vsyscall.o
33obj-$(CONFIG_ACPI_SRAT) += srat.o 33obj-$(CONFIG_ACPI_SRAT) += srat.o
34obj-$(CONFIG_HPET_TIMER) += time_hpet.o 34obj-$(CONFIG_HPET_TIMER) += time_hpet.o
35obj-$(CONFIG_EFI) += efi.o efi_stub.o 35obj-$(CONFIG_EFI) += efi.o efi_stub.o
36obj-$(CONFIG_DOUBLEFAULT) += doublefault.o
36obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 37obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
37 38
38EXTRA_AFLAGS := -traditional 39EXTRA_AFLAGS := -traditional
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index cca655688ff..170400879f4 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -609,8 +609,10 @@ void __devinit cpu_init(void)
609 load_TR_desc(); 609 load_TR_desc();
610 load_LDT(&init_mm.context); 610 load_LDT(&init_mm.context);
611 611
612#ifdef CONFIG_DOUBLEFAULT
612 /* Set up doublefault TSS pointer in the GDT */ 613 /* Set up doublefault TSS pointer in the GDT */
613 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss); 614 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
615#endif
614 616
615 /* Clear %fs and %gs. */ 617 /* Clear %fs and %gs. */
616 asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs"); 618 asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
diff --git a/init/Kconfig b/init/Kconfig
index 0c9932f9f06..0eb65f2ad8c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -309,6 +309,15 @@ config BUG
309 option for embedded systems with no facilities for reporting errors. 309 option for embedded systems with no facilities for reporting errors.
310 Just say Y. 310 Just say Y.
311 311
312config DOUBLEFAULT
313 depends X86
314 default y if X86
315 bool "Enable doublefault exception handler" if EMBEDDED
316 help
317 This option allows trapping of rare doublefault exceptions that
318 would otherwise cause a system to silently reboot. Disabling this
319 option saves about 4k.
320
312config BASE_FULL 321config BASE_FULL
313 default y 322 default y
314 bool "Enable full-sized data structures for core" if EMBEDDED 323 bool "Enable full-sized data structures for core" if EMBEDDED