lkml.org 
[lkml]   [1999]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] error in cpuid usage
Hi,

I found a minor error in the cpu detection code for x86 processors. In analogy
with the standard functions the first extended cpuid function returns the
highest supported function number, which is not a number in the region 0 .. 9,
but 0x80000000 and above!
So here is my very small patch:

Hans-Frieder

--- linux-2.2.0-pre6/arch/i386/kernel/setup.c Wed Jan 6 22:53:22 1999
+++ linux/arch/i386/kernel/setup.c Mon Jan 11 22:33:51 1999
@@ -252,7 +252,7 @@
*/

cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
- if (n < 4)
+ if (n < 0x80000004)
return 0;
cpuid(0x80000001, &dummy, &dummy, &dummy, &(c->x86_capability));
v = (unsigned int *) c->x86_model_id;

--
--
Hans-Frieder Vogt e-mail: vogt@ila.uni-stuttgart.de
Institut f"ur Luftfahrtantriebe tel : +49 (711) 685-3522
Universit"at Stuttgart
Pfaffenwaldring 6
D-70569 Stuttgart, Germany


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.035 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site