Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5b41a67 authored by Borislav Petkov's avatar Borislav Petkov Committed by H. Peter Anvin
Browse files

x86, cpu: Convert Cyrix coma bug detection

parent 93a829e8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@

#define X86_BUG_F00F		X86_BUG(0) /* Intel F00F */
#define X86_BUG_FDIV		X86_BUG(1) /* FPU FDIV */
#define X86_BUG_COMA		X86_BUG(2) /* Cyrix 6x86 coma */

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

+0 −1
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ struct cpuinfo_x86 {
	/* Problems on some 486Dx4's and old 386's: */
	char			hard_math;
	char			rfu;
	char			coma_bug;
	char			pad0;
#else
	/* Number of 4K pages in DTLB/ITLB combined(in pages): */
+3 −2
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
		/* Emulate MTRRs using Cyrix's ARRs. */
		set_cpu_cap(c, X86_FEATURE_CYRIX_ARR);
		/* 6x86's contain this bug */
		c->coma_bug = 1;
		set_cpu_bug(c, X86_BUG_COMA);
		break;

	case 4: /* MediaGX/GXm or Geode GXM/GXLV/GX1 */
@@ -317,7 +317,8 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
			/* Enable MMX extensions (App note 108) */
			setCx86_old(CX86_CCR7, getCx86_old(CX86_CCR7)|1);
		} else {
			c->coma_bug = 1;      /* 6x86MX, it has the bug. */
			/* A 6x86MX - it has the bug. */
			set_cpu_bug(c, X86_BUG_COMA);
		}
		tmp = (!(dir0_lsn & 7) || dir0_lsn & 1) ? 2 : 0;
		Cx86_cb[tmp] = cyrix_model_mult2[dir0_lsn & 7];
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
		   "wp\t\t: %s\n",
		   static_cpu_has_bug(X86_BUG_FDIV) ? "yes" : "no",
		   static_cpu_has_bug(X86_BUG_F00F) ? "yes" : "no",
		   c->coma_bug ? "yes" : "no",
		   static_cpu_has_bug(X86_BUG_COMA) ? "yes" : "no",
		   c->hard_math ? "yes" : "no",
		   c->hard_math ? "yes" : "no",
		   c->cpuid_level,