Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366222
b: refs/heads/master
c: e2604b4
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and H. Peter Anvin committed Apr 2, 2013
1 parent 5e1f846 commit c677c2c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65fc985b37dc241c4db7cd32adcbc989193fe3c8
refs/heads/master: e2604b49e8a8827e8bc5b61bc0c5a889e028fdad
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/cpufeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@
*/
#define X86_BUG(x) (NCAPINTS*32 + (x))

#define X86_BUG_F00F X86_BUG(0) /* Intel F00F */

#if defined(__KERNEL__) && !defined(__ASSEMBLY__)

#include <asm/asm.h>
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ struct cpuinfo_x86 {
char hard_math;
char rfu;
char fdiv_bug;
char f00f_bug;
char coma_bug;
char pad0;
#else
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/cpu/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c)
* system.
* Note that the workaround only should be initialized once...
*/
c->f00f_bug = 0;
clear_cpu_bug(c, X86_BUG_F00F);
if (!paravirt_enabled() && c->x86 == 5) {
static int f00f_workaround_enabled;

c->f00f_bug = 1;
set_cpu_bug(c, X86_BUG_F00F);
if (!f00f_workaround_enabled) {
trap_init_f00f_bug();
printk(KERN_NOTICE "Intel Pentium with F0 0F bug - workaround enabled.\n");
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/cpu/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
"cpuid level\t: %d\n"
"wp\t\t: %s\n",
c->fdiv_bug ? "yes" : "no",
c->f00f_bug ? "yes" : "no",
static_cpu_has_bug(X86_BUG_F00F) ? "yes" : "no",
c->coma_bug ? "yes" : "no",
c->hard_math ? "yes" : "no",
c->hard_math ? "yes" : "no",
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
/*
* Pentium F0 0F C7 C8 bug workaround:
*/
if (boot_cpu_data.f00f_bug) {
if (boot_cpu_has_bug(X86_BUG_F00F)) {
nr = (address - idt_descr.address) >> 3;

if (nr == 6) {
Expand Down

0 comments on commit c677c2c

Please sign in to comment.