aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-27 08:30:07 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-27 08:30:07 -0400
commitefda9452046bdd707b23a85b7846ec33548f84f1 (patch)
treef08c915049ea1829ba115cd41a0ba28ddf184e07 /arch/i386/kernel
parentb01f2cc1c37ac3d5ca313c90370a586dffe5aca9 (diff)
parent36676bcbf9f6bcbea9d06e67ee8d04eacde54952 (diff)
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r--arch/i386/kernel/apic.c4
-rw-r--r--arch/i386/kernel/nmi.c4
-rw-r--r--arch/i386/kernel/traps.c10
3 files changed, 8 insertions, 10 deletions
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index bd1dbf3bd223..a22a866de8f9 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -726,15 +726,11 @@ __setup("apic=", apic_set_verbosity);
726static int __init detect_init_APIC (void) 726static int __init detect_init_APIC (void)
727{ 727{
728 u32 h, l, features; 728 u32 h, l, features;
729 extern void get_cpu_vendor(struct cpuinfo_x86*);
730 729
731 /* Disabled by kernel option? */ 730 /* Disabled by kernel option? */
732 if (enable_local_apic < 0) 731 if (enable_local_apic < 0)
733 return -1; 732 return -1;
734 733
735 /* Workaround for us being called before identify_cpu(). */
736 get_cpu_vendor(&boot_cpu_data);
737
738 switch (boot_cpu_data.x86_vendor) { 734 switch (boot_cpu_data.x86_vendor) {
739 case X86_VENDOR_AMD: 735 case X86_VENDOR_AMD:
740 if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) || 736 if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) ||
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index da6c46d667cb..8c242bb1ef45 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -195,7 +195,7 @@ static void disable_lapic_nmi_watchdog(void)
195 wrmsr(MSR_P6_EVNTSEL0, 0, 0); 195 wrmsr(MSR_P6_EVNTSEL0, 0, 0);
196 break; 196 break;
197 case 15: 197 case 15:
198 if (boot_cpu_data.x86_model > 0x3) 198 if (boot_cpu_data.x86_model > 0x4)
199 break; 199 break;
200 200
201 wrmsr(MSR_P4_IQ_CCCR0, 0, 0); 201 wrmsr(MSR_P4_IQ_CCCR0, 0, 0);
@@ -432,7 +432,7 @@ void setup_apic_nmi_watchdog (void)
432 setup_p6_watchdog(); 432 setup_p6_watchdog();
433 break; 433 break;
434 case 15: 434 case 15:
435 if (boot_cpu_data.x86_model > 0x3) 435 if (boot_cpu_data.x86_model > 0x4)
436 return; 436 return;
437 437
438 if (!setup_p4_watchdog()) 438 if (!setup_p4_watchdog())
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index a61f33d06ea3..cd2d5d5514fe 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -803,15 +803,17 @@ void math_error(void __user *eip)
803 */ 803 */
804 cwd = get_fpu_cwd(task); 804 cwd = get_fpu_cwd(task);
805 swd = get_fpu_swd(task); 805 swd = get_fpu_swd(task);
806 switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) { 806 switch (swd & ~cwd & 0x3f) {
807 case 0x000: 807 case 0x000:
808 default: 808 default:
809 break; 809 break;
810 case 0x001: /* Invalid Op */ 810 case 0x001: /* Invalid Op */
811 case 0x041: /* Stack Fault */ 811 /*
812 case 0x241: /* Stack Fault | Direction */ 812 * swd & 0x240 == 0x040: Stack Underflow
813 * swd & 0x240 == 0x240: Stack Overflow
814 * User must clear the SF bit (0x40) if set
815 */
813 info.si_code = FPE_FLTINV; 816 info.si_code = FPE_FLTINV;
814 /* Should we clear the SF or let user space do it ???? */
815 break; 817 break;
816 case 0x002: /* Denormalize */ 818 case 0x002: /* Denormalize */
817 case 0x010: /* Underflow */ 819 case 0x010: /* Underflow */