From: Zwane Mwaikambo <[email-masked]>

http://bugme.osdl.org/show_bug.cgi?id=4426

vendor_id       : AuthenticAMD
cpu family      : 6
model           : 10
model name      : AMD Athlon(tm) XP
stepping        : 0
cpu MHz         : 2204.807
<snipped>
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 mmx fxsr sse pni syscall mmxext 3dnowext 3dnow
bogomips        : 4358.14

We're marking bit 0 of extended function 0x80000001 cpuid as PNI support on
AMD processors, when it actually denotes x87 FPU present.  Patch for i386
and x86_64 below.

Signed-off-by: Zwane Mwaikambo <[email-masked]>
Cc: Andi Kleen <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 arch/i386/kernel/cpu/proc.c |    2 +-
 arch/x86_64/kernel/setup.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/i386/kernel/cpu/proc.c~cpuid-x87-bit-on-amd-falsely-marked-as-pni arch/i386/kernel/cpu/proc.c
--- 25/arch/i386/kernel/cpu/proc.c~cpuid-x87-bit-on-amd-falsely-marked-as-pni	2005-04-26 21:14:58.800799312 -0700
+++ 25-akpm/arch/i386/kernel/cpu/proc.c	2005-04-26 21:14:58.806798400 -0700
@@ -25,7 +25,7 @@ static int show_cpuinfo(struct seq_file 
 	        "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe",
 
 		/* AMD-defined */
-		"pni", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+		NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 		NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
 		NULL, NULL, NULL, "mp", "nx", NULL, "mmxext", NULL,
 		NULL, "fxsr_opt", NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
diff -puN arch/x86_64/kernel/setup.c~cpuid-x87-bit-on-amd-falsely-marked-as-pni arch/x86_64/kernel/setup.c
--- 25/arch/x86_64/kernel/setup.c~cpuid-x87-bit-on-amd-falsely-marked-as-pni	2005-04-26 21:14:58.801799160 -0700
+++ 25-akpm/arch/x86_64/kernel/setup.c	2005-04-26 21:14:58.807798248 -0700
@@ -1076,7 +1076,7 @@ static int show_cpuinfo(struct seq_file 
 	        "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", NULL,
 
 		/* AMD-defined */
-		"pni", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+		NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 		NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
 		NULL, NULL, NULL, NULL, "nx", NULL, "mmxext", NULL,
 		NULL, "fxsr_opt", NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
_