From 10a4f6657b2437bb8a76e2796e0072ec47cea4ae Mon Sep 17 00:00:00 2001 From: Matt Mackall Date: Sun, 8 Jan 2006 01:05:24 -0800 Subject: [PATCH] --- yaml --- r: 17047 b: refs/heads/master c: 22c4e3084eb8b88288a622a57d8b35c450a439f2 h: refs/heads/master i: 17045: f59de15ddc812f0e00145f205e6fde70502cc2a5 17043: 1f4315cc50c35ae652d301b8ae87ad972e1b46f2 17039: 3a17548b25641096e2c1f15009c96bf3cae7f83b v: v3 --- [refs] | 2 +- trunk/arch/i386/kernel/Makefile | 3 ++- trunk/arch/i386/kernel/cpu/common.c | 2 ++ trunk/init/Kconfig | 9 +++++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 522842a87bd4..3eee02317aa0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 18e92b12e83bef077a31ba6871f1aec3621b69e3 +refs/heads/master: 22c4e3084eb8b88288a622a57d8b35c450a439f2 diff --git a/trunk/arch/i386/kernel/Makefile b/trunk/arch/i386/kernel/Makefile index f10de0f2c5e6..4f40589e179c 100644 --- a/trunk/arch/i386/kernel/Makefile +++ b/trunk/arch/i386/kernel/Makefile @@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ - doublefault.o quirks.o i8237.o + quirks.o i8237.o obj-y += cpu/ obj-y += timers/ @@ -33,6 +33,7 @@ obj-y += sysenter.o vsyscall.o obj-$(CONFIG_ACPI_SRAT) += srat.o obj-$(CONFIG_HPET_TIMER) += time_hpet.o obj-$(CONFIG_EFI) += efi.o efi_stub.o +obj-$(CONFIG_DOUBLEFAULT) += doublefault.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o EXTRA_AFLAGS := -traditional diff --git a/trunk/arch/i386/kernel/cpu/common.c b/trunk/arch/i386/kernel/cpu/common.c index cca655688ffc..170400879f44 100644 --- a/trunk/arch/i386/kernel/cpu/common.c +++ b/trunk/arch/i386/kernel/cpu/common.c @@ -609,8 +609,10 @@ void __devinit cpu_init(void) load_TR_desc(); load_LDT(&init_mm.context); +#ifdef CONFIG_DOUBLEFAULT /* Set up doublefault TSS pointer in the GDT */ __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss); +#endif /* Clear %fs and %gs. */ asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs"); diff --git a/trunk/init/Kconfig b/trunk/init/Kconfig index 0c9932f9f06b..0eb65f2ad8c9 100644 --- a/trunk/init/Kconfig +++ b/trunk/init/Kconfig @@ -309,6 +309,15 @@ config BUG option for embedded systems with no facilities for reporting errors. Just say Y. +config DOUBLEFAULT + depends X86 + default y if X86 + bool "Enable doublefault exception handler" if EMBEDDED + help + This option allows trapping of rare doublefault exceptions that + would otherwise cause a system to silently reboot. Disabling this + option saves about 4k. + config BASE_FULL default y bool "Enable full-sized data structures for core" if EMBEDDED