lkml.org 
[lkml]   [2000]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectx86 cpu_data

Hi, I need to check for *only* Intel P6 processors, so no Classic Pentium,
and no Pentium 4. setup.c is a bit obscure; is this check correct :

if (current_cpu_data.x86_vendor != X86_VENDOR_INTEL ||
current_cpu_data.x86 != 6)
return NOT_P6;
if (current_cpu_data.x86_model > 5)
return PENTIUM_III;
if (current_cpu_data.x86_model > 2)
return PENTIUM_II;
return PENTIUM_PRO;

??

(I need this check as I make use of the P6 performance counters).

Also, I found a weird bit of code in setup.c (2.4.0test12) :

1567 case 4:
1568 if ( c->x86 > 6 && dl ) {
1569 /* P4 family */
1570 if ( dl ) {
1571 /* L3 cache */
1572 cs = 128 << (dl-1);
1573 l3 += cs;
1574 break;
1575 }
1576 }
1577 /* else same as 8 - fall through */
1578 case 8:
1579 if ( dl ) {

in particular, the check on line 1570 seems redundant, or a typo.

thanks
john

--
"Kaa's Law: In any sufficiently large group of people most are idiots."
"Adams' Corollary: "sufficiently large" is around 1."

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

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