public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.5.x: arch/i386/kernel/cpu
@ 2002-06-19  3:45 H. Peter Anvin
  2002-06-19  4:38 ` Dave Jones
  2002-06-21 18:18 ` Patrick Mochel
  0 siblings, 2 replies; 6+ messages in thread
From: H. Peter Anvin @ 2002-06-19  3:45 UTC (permalink / raw)
  To: linux-kernel

Whomever broke up arch/i386/kernel/setup.c and created the CPU
directory (very good idea) messed up in at least one place:

The *AMD-defined* CPUID flags (0x80000001) are not just used on AMD
processors!  In fact, at least AMD, Transmeta, Cyrix and VIA all use
them; I don't know about Centaur or Rise.  Intel supports the actual
level starting with the P4 although it returns all zero.

It should, in my opinion, be moved into generic_identify().  Anyone
who has a reason why that shouldn't be done speak now or I'll send the
patch to Linus.

	-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.5.x: arch/i386/kernel/cpu
  2002-06-19  3:45 2.5.x: arch/i386/kernel/cpu H. Peter Anvin
@ 2002-06-19  4:38 ` Dave Jones
  2002-06-19  4:43   ` H. Peter Anvin
  2002-06-21 18:18 ` Patrick Mochel
  1 sibling, 1 reply; 6+ messages in thread
From: Dave Jones @ 2002-06-19  4:38 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linux-kernel

On Tue, Jun 18, 2002 at 08:45:18PM -0700, H. Peter Anvin wrote:
 > Whomever broke up arch/i386/kernel/setup.c and created the CPU
 > directory (very good idea) messed up in at least one place:

Patrick Mochel takes credit/glory/fame/blame for this one.

 > The *AMD-defined* CPUID flags (0x80000001) are not just used on AMD
 > processors!  In fact, at least AMD, Transmeta, Cyrix and VIA all use
 > them; I don't know about Centaur or Rise.  Intel supports the actual
 > level starting with the P4 although it returns all zero.

Bugger, you're right.

On my Cyrix III box before..

 CPU: After vendor init, caps: 00803135 80803035 00000000 00000000
 CPU:     After generic, caps: 00803135 80803035 00000000 00000000
 CPU:             Common caps: 00803135 80803035 00000000 00000000

and after..

 CPU: After vendor init, caps: 00803135 80000000 00000000 00000000
 CPU:     After generic, caps: 00803135 80000000 00000000 00000000
 CPU:             Common caps: 00803135 80000000 00000000 00000000

Interesting how it's picking up that 8 in the 2nd set of caps, but
not any of the other bits..

 > It should, in my opinion, be moved into generic_identify().  Anyone
 > who has a reason why that shouldn't be done speak now or I'll send the
 > patch to Linus.

Sounds reasonable to me, unless Patrick has a preferred way of fixing 
this problem.

        Dave


-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.5.x: arch/i386/kernel/cpu
  2002-06-19  4:38 ` Dave Jones
@ 2002-06-19  4:43   ` H. Peter Anvin
  2002-06-19  4:58     ` Dave Jones
  0 siblings, 1 reply; 6+ messages in thread
From: H. Peter Anvin @ 2002-06-19  4:43 UTC (permalink / raw)
  To: Dave Jones; +Cc: linux-kernel

Dave Jones wrote:
> On Tue, Jun 18, 2002 at 08:45:18PM -0700, H. Peter Anvin wrote:
>  > Whomever broke up arch/i386/kernel/setup.c and created the CPU
>  > directory (very good idea) messed up in at least one place:
> 
> Patrick Mochel takes credit/glory/fame/blame for this one.

Note that this is great.  We should do the same with bugs.h which is, if 
anything, an even worse mess.

>  > The *AMD-defined* CPUID flags (0x80000001) are not just used on AMD
>  > processors!  In fact, at least AMD, Transmeta, Cyrix and VIA all use
>  > them; I don't know about Centaur or Rise.  Intel supports the actual
>  > level starting with the P4 although it returns all zero.
> 
> Bugger, you're right.

Looked a little harder, and it should *definitely* be moved to generic, 
since it also includes the CPU name string check, which is supported 
even on Intel P4 CPUs.

> On my Cyrix III box before..
> 
>  CPU: After vendor init, caps: 00803135 80803035 00000000 00000000
>  CPU:     After generic, caps: 00803135 80803035 00000000 00000000
>  CPU:             Common caps: 00803135 80803035 00000000 00000000
> 
> and after..
> 
>  CPU: After vendor init, caps: 00803135 80000000 00000000 00000000
>  CPU:     After generic, caps: 00803135 80000000 00000000 00000000
>  CPU:             Common caps: 00803135 80000000 00000000 00000000
> 
> Interesting how it's picking up that 8 in the 2nd set of caps, but
> not any of the other bits..

That's the 3DNow! bit... I was thinking it might be handled specially, 
but it looks like that's only done for Centaur chips.  Are you sure your 
CPU isn't being mis-identified as Centaur by the new code?

>  > It should, in my opinion, be moved into generic_identify().  Anyone
>  > who has a reason why that shouldn't be done speak now or I'll send the
>  > patch to Linus.
> 
> Sounds reasonable to me, unless Patrick has a preferred way of fixing 
> this problem.
> 
>         Dave
> 
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.5.x: arch/i386/kernel/cpu
  2002-06-19  4:43   ` H. Peter Anvin
@ 2002-06-19  4:58     ` Dave Jones
  2002-06-19  5:03       ` H. Peter Anvin
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Jones @ 2002-06-19  4:58 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linux-kernel

On Tue, Jun 18, 2002 at 09:43:19PM -0700, H. Peter Anvin wrote:

 > > Patrick Mochel takes credit/glory/fame/blame for this one.
 > Note that this is great.  We should do the same with bugs.h which is, if 
 > anything, an even worse mess.

Agreed. Patrick also did similar work on the mtrr driver which isn't
merged anywhere yet. That's something else that's been long overdue
this treatment.  (Also on my list for chopping into bits is
agpgart_be.c, but that's another story..)

 > > On my Cyrix III box before..
 > > Interesting how it's picking up that 8 in the 2nd set of caps, but
 > > not any of the other bits..
 > 
 > That's the 3DNow! bit... I was thinking it might be handled specially, 
 > but it looks like that's only done for Centaur chips.  Are you sure your 
 > CPU isn't being mis-identified as Centaur by the new code?

It is being (correctly) identified as Centaur.
VIA Cyrixen are CentaurHauls family 6

        Dave

-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.5.x: arch/i386/kernel/cpu
  2002-06-19  4:58     ` Dave Jones
@ 2002-06-19  5:03       ` H. Peter Anvin
  0 siblings, 0 replies; 6+ messages in thread
From: H. Peter Anvin @ 2002-06-19  5:03 UTC (permalink / raw)
  To: Dave Jones; +Cc: linux-kernel

Dave Jones wrote:
>  > 
>  > That's the 3DNow! bit... I was thinking it might be handled specially, 
>  > but it looks like that's only done for Centaur chips.  Are you sure your 
>  > CPU isn't being mis-identified as Centaur by the new code?
> 
> It is being (correctly) identified as Centaur.
> VIA Cyrixen are CentaurHauls family 6
> 

Well, then... there ya go :)

	-hpa



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.5.x: arch/i386/kernel/cpu
  2002-06-19  3:45 2.5.x: arch/i386/kernel/cpu H. Peter Anvin
  2002-06-19  4:38 ` Dave Jones
@ 2002-06-21 18:18 ` Patrick Mochel
  1 sibling, 0 replies; 6+ messages in thread
From: Patrick Mochel @ 2002-06-21 18:18 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linux-kernel


On 18 Jun 2002, H. Peter Anvin wrote:

> Whomever broke up arch/i386/kernel/setup.c and created the CPU
> directory (very good idea) messed up in at least one place:

Ah! I just noticed this (as I was cleaning out my inbox before I head off 
to Canada). 

> The *AMD-defined* CPUID flags (0x80000001) are not just used on AMD
> processors!  In fact, at least AMD, Transmeta, Cyrix and VIA all use
> them; I don't know about Centaur or Rise.  Intel supports the actual
> level starting with the P4 although it returns all zero.
> 
> It should, in my opinion, be moved into generic_identify().  Anyone
> who has a reason why that shouldn't be done speak now or I'll send the
> patch to Linus.

If you've already sent it, good. If not, and you have something readily 
available, good. If not, I'll add it to my short list and look at it in 
the next few days (hopefully).

Thanks,

	-pat


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-06-21 18:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-19  3:45 2.5.x: arch/i386/kernel/cpu H. Peter Anvin
2002-06-19  4:38 ` Dave Jones
2002-06-19  4:43   ` H. Peter Anvin
2002-06-19  4:58     ` Dave Jones
2002-06-19  5:03       ` H. Peter Anvin
2002-06-21 18:18 ` Patrick Mochel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox