summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/identcpu.c6
-rw-r--r--sys/amd64/amd64/machdep.c8
-rw-r--r--sys/amd64/amd64/trap.c10
-rw-r--r--sys/i386/i386/identcpu.c6
-rw-r--r--sys/i386/i386/machdep.c8
-rw-r--r--sys/i386/i386/trap.c10
-rw-r--r--sys/kern/subr_trap.c10
7 files changed, 29 insertions, 29 deletions
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c
index e299241..95909d8 100644
--- a/sys/amd64/amd64/identcpu.c
+++ b/sys/amd64/amd64/identcpu.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
- * $Id: identcpu.c,v 1.33 1997/11/07 08:52:27 phk Exp $
+ * $Id: identcpu.c,v 1.34 1997/12/03 02:45:42 sef Exp $
*/
#include "opt_cpu.h"
@@ -107,7 +107,7 @@ do_cpuid(u_long ax, u_long *p)
);
}
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
int has_f00f_bug = 0;
#endif
@@ -140,7 +140,7 @@ printcpuinfo(void)
break;
case 0x500:
strcat(cpu_model, "Pentium"); /* nb no space */
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
/*
* XXX - If/when Intel fixes the bug, this
* should also check the version of the
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 986b16b..bf1f8bf0 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.275 1997/12/03 02:45:46 sef Exp $
+ * $Id: machdep.c,v 1.276 1997/12/03 16:27:33 sef Exp $
*/
#include "apm.h"
@@ -866,7 +866,7 @@ u_int my_tr; /* which task register setting */
#endif /* VM86 */
#endif
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@@ -1539,7 +1539,7 @@ init386(first)
proc0.p_addr->u_pcb.pcb_ext = 0;
}
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
void f00f_hack(void);
SYSINIT(f00f_hack, SI_SUB_INTRINSIC, SI_ORDER_FIRST, f00f_hack, NULL);
@@ -1571,7 +1571,7 @@ f00f_hack(void) {
panic("vm_map_protect failed");
return;
}
-#endif /* NO_F00F_HACK */
+#endif /* defined(I586_CPU) && !NO_F00F_HACK */
int
ptrace_set_pc(p, addr)
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 9bebd7e..e8a8ea0 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.115 1997/11/24 13:25:37 bde Exp $
+ * $Id: trap.c,v 1.116 1997/12/03 02:45:50 sef Exp $
*/
/*
@@ -142,7 +142,7 @@ static char *trap_msg[] = {
static void userret __P((struct proc *p, struct trapframe *frame,
u_quad_t oticks));
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
extern struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@@ -216,7 +216,7 @@ trap(frame)
u_long eva;
#endif
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
restart:
#endif
type = frame.tf_trapno;
@@ -284,7 +284,7 @@ restart:
i = trap_pfault(&frame, TRUE);
if (i == -1)
return;
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if (i == -2)
goto restart;
#endif
@@ -660,7 +660,7 @@ trap_pfault(frame, usermode)
* treat it is as an illegal instruction, and not a page
* fault.
*/
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if ((eva == (unsigned int)&t_idt[6]) && has_f00f_bug) {
frame->tf_trapno = T_PRIVINFLT;
return -2;
diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c
index e299241..95909d8 100644
--- a/sys/i386/i386/identcpu.c
+++ b/sys/i386/i386/identcpu.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
- * $Id: identcpu.c,v 1.33 1997/11/07 08:52:27 phk Exp $
+ * $Id: identcpu.c,v 1.34 1997/12/03 02:45:42 sef Exp $
*/
#include "opt_cpu.h"
@@ -107,7 +107,7 @@ do_cpuid(u_long ax, u_long *p)
);
}
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
int has_f00f_bug = 0;
#endif
@@ -140,7 +140,7 @@ printcpuinfo(void)
break;
case 0x500:
strcat(cpu_model, "Pentium"); /* nb no space */
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
/*
* XXX - If/when Intel fixes the bug, this
* should also check the version of the
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 986b16b..bf1f8bf0 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.275 1997/12/03 02:45:46 sef Exp $
+ * $Id: machdep.c,v 1.276 1997/12/03 16:27:33 sef Exp $
*/
#include "apm.h"
@@ -866,7 +866,7 @@ u_int my_tr; /* which task register setting */
#endif /* VM86 */
#endif
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@@ -1539,7 +1539,7 @@ init386(first)
proc0.p_addr->u_pcb.pcb_ext = 0;
}
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
void f00f_hack(void);
SYSINIT(f00f_hack, SI_SUB_INTRINSIC, SI_ORDER_FIRST, f00f_hack, NULL);
@@ -1571,7 +1571,7 @@ f00f_hack(void) {
panic("vm_map_protect failed");
return;
}
-#endif /* NO_F00F_HACK */
+#endif /* defined(I586_CPU) && !NO_F00F_HACK */
int
ptrace_set_pc(p, addr)
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index 9bebd7e..e8a8ea0 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.115 1997/11/24 13:25:37 bde Exp $
+ * $Id: trap.c,v 1.116 1997/12/03 02:45:50 sef Exp $
*/
/*
@@ -142,7 +142,7 @@ static char *trap_msg[] = {
static void userret __P((struct proc *p, struct trapframe *frame,
u_quad_t oticks));
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
extern struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@@ -216,7 +216,7 @@ trap(frame)
u_long eva;
#endif
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
restart:
#endif
type = frame.tf_trapno;
@@ -284,7 +284,7 @@ restart:
i = trap_pfault(&frame, TRUE);
if (i == -1)
return;
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if (i == -2)
goto restart;
#endif
@@ -660,7 +660,7 @@ trap_pfault(frame, usermode)
* treat it is as an illegal instruction, and not a page
* fault.
*/
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if ((eva == (unsigned int)&t_idt[6]) && has_f00f_bug) {
frame->tf_trapno = T_PRIVINFLT;
return -2;
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 9bebd7e..e8a8ea0 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.115 1997/11/24 13:25:37 bde Exp $
+ * $Id: trap.c,v 1.116 1997/12/03 02:45:50 sef Exp $
*/
/*
@@ -142,7 +142,7 @@ static char *trap_msg[] = {
static void userret __P((struct proc *p, struct trapframe *frame,
u_quad_t oticks));
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
extern struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@@ -216,7 +216,7 @@ trap(frame)
u_long eva;
#endif
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
restart:
#endif
type = frame.tf_trapno;
@@ -284,7 +284,7 @@ restart:
i = trap_pfault(&frame, TRUE);
if (i == -1)
return;
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if (i == -2)
goto restart;
#endif
@@ -660,7 +660,7 @@ trap_pfault(frame, usermode)
* treat it is as an illegal instruction, and not a page
* fault.
*/
-#ifndef NO_F00F_HACK
+#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if ((eva == (unsigned int)&t_idt[6]) && has_f00f_bug) {
frame->tf_trapno = T_PRIVINFLT;
return -2;
OpenPOWER on IntegriCloud