LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] x86: a P4 is a P6 not an i486
@ 2008-03-04 19:33 Hugh Dickins
2008-03-04 21:01 ` Ingo Molnar
0 siblings, 1 reply; 11+ messages in thread
From: Hugh Dickins @ 2008-03-04 19:33 UTC (permalink / raw)
To: Linus Torvalds
Cc: Andrew Morton, H. Peter Anvin, Ingo Molnar, Thomas Gleixner,
linux-kernel
P4 has been coming out as CPU_FAMILY=4 instead of 6: fix MPENTIUM4 typo.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 2.6.25-rc3-git/arch/x86/Kconfig.cpu 2008-02-27 07:57:20.000000000 +0000
+++ linux/arch/x86/Kconfig.cpu 2008-03-04 13:50:39.000000000 +0000
@@ -388,7 +388,7 @@ config X86_OOSTORE
#
config X86_P6_NOP
def_bool y
- depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || PENTIUM4)
+ depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4)
config X86_TSC
def_bool y
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86: a P4 is a P6 not an i486
2008-03-04 19:33 [PATCH] x86: a P4 is a P6 not an i486 Hugh Dickins
@ 2008-03-04 21:01 ` Ingo Molnar
2008-03-04 21:24 ` H. Peter Anvin
0 siblings, 1 reply; 11+ messages in thread
From: Ingo Molnar @ 2008-03-04 21:01 UTC (permalink / raw)
To: Hugh Dickins
Cc: Linus Torvalds, Andrew Morton, H. Peter Anvin, Thomas Gleixner,
linux-kernel
* Hugh Dickins <hugh@veritas.com> wrote:
> P4 has been coming out as CPU_FAMILY=4 instead of 6: fix MPENTIUM4
> typo.
thanks Hugh, applied.
Ingo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86: a P4 is a P6 not an i486
2008-03-04 21:01 ` Ingo Molnar
@ 2008-03-04 21:24 ` H. Peter Anvin
2008-03-04 21:32 ` Ingo Molnar
2008-03-10 19:14 ` P6 NOPs again: MPSC? Hugh Dickins
0 siblings, 2 replies; 11+ messages in thread
From: H. Peter Anvin @ 2008-03-04 21:24 UTC (permalink / raw)
To: Ingo Molnar
Cc: Hugh Dickins, Linus Torvalds, Andrew Morton, Thomas Gleixner,
linux-kernel
Ingo Molnar wrote:
> * Hugh Dickins <hugh@veritas.com> wrote:
>
>> P4 has been coming out as CPU_FAMILY=4 instead of 6: fix MPENTIUM4
>> typo.
>
> thanks Hugh, applied.
>
> Ingo
The patch is correct, obviously; the comment is not: the real comment
should be:
Enable the use of P6 NOPs on Pentium 4
The CPU_FAMILY field is really the minimum CPU family that can boot the
kernel (that's why there is no 5; we don't have any i586 family
dependencies not encoded by CPUID bits.)
-hpa
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86: a P4 is a P6 not an i486
2008-03-04 21:24 ` H. Peter Anvin
@ 2008-03-04 21:32 ` Ingo Molnar
2008-03-10 19:14 ` P6 NOPs again: MPSC? Hugh Dickins
1 sibling, 0 replies; 11+ messages in thread
From: Ingo Molnar @ 2008-03-04 21:32 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Hugh Dickins, Linus Torvalds, Andrew Morton, Thomas Gleixner,
linux-kernel
* H. Peter Anvin <hpa@zytor.com> wrote:
>>> P4 has been coming out as CPU_FAMILY=4 instead of 6: fix MPENTIUM4
>>> typo.
>>
>> thanks Hugh, applied.
>
> The patch is correct, obviously; the comment is not: the real comment
> should be:
>
> Enable the use of P6 NOPs on Pentium 4
>
> The CPU_FAMILY field is really the minimum CPU family that can boot
> the kernel (that's why there is no 5; we don't have any i586 family
> dependencies not encoded by CPUID bits.)
yeah, i've updated the commit. (find it below)
Ingo
----------->
Subject: x86: enable the use of P6 NOPs on Pentium 4
From: Hugh Dickins <hugh@veritas.com>
Date: Tue, 4 Mar 2008 19:33:24 +0000 (GMT)
fix MPENTIUM4 typo - it resulted in P4s using less optimal NOPs.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-x86.q/arch/x86/Kconfig.cpu
===================================================================
--- linux-x86.q.orig/arch/x86/Kconfig.cpu
+++ linux-x86.q/arch/x86/Kconfig.cpu
@@ -388,7 +388,7 @@ config X86_OOSTORE
#
config X86_P6_NOP
def_bool y
- depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || PENTIUM4)
+ depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4)
config X86_TSC
def_bool y
^ permalink raw reply [flat|nested] 11+ messages in thread
* P6 NOPs again: MPSC?
2008-03-04 21:24 ` H. Peter Anvin
2008-03-04 21:32 ` Ingo Molnar
@ 2008-03-10 19:14 ` Hugh Dickins
2008-03-10 20:17 ` H. Peter Anvin
1 sibling, 1 reply; 11+ messages in thread
From: Hugh Dickins @ 2008-03-10 19:14 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Ingo Molnar, Linus Torvalds, Andrew Morton, Thomas Gleixner,
linux-kernel
I've now noticed that the machine I call MPENTIUM4 for 32-bit kernels
is called MPSC for 64-bit kernels, and in that case it still doesn't
get the P6 NOPs which I'm guessing it ought to (yeah, I'm so excited
about the speedup I can expect from P6 NOPs, can we perhaps have a
little silvery "Using Genuine P6 NOPs" sticker to put on the box? ;)
I'm suspecting that the patch below is actually wrong, and that it's
really the "(X86_64 || !X86_GENERIC) &&" which should be changed;
but very unsure of my ground and what's right for CPU_GENERIC -
the 32/64 heritage of x86/Kconfig.cpu rather confuses me.
Over to you to do the right thing, I'm hoping, please, Peter!
Thanks,
Hugh
--- 2.6.25-rc5/arch/x86/Kconfig.cpu 2008-03-05 11:27:23.000000000 +0000
+++ linux/arch/x86/Kconfig.cpu 2008-03-10 18:48:10.000000000 +0000
@@ -388,7 +388,7 @@ config X86_OOSTORE
#
config X86_P6_NOP
def_bool y
- depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4)
+ depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4 || MPSC)
config X86_TSC
def_bool y
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: P6 NOPs again: MPSC?
2008-03-10 19:14 ` P6 NOPs again: MPSC? Hugh Dickins
@ 2008-03-10 20:17 ` H. Peter Anvin
2008-03-10 22:02 ` Hugh Dickins
0 siblings, 1 reply; 11+ messages in thread
From: H. Peter Anvin @ 2008-03-10 20:17 UTC (permalink / raw)
To: Hugh Dickins
Cc: Ingo Molnar, Linus Torvalds, Andrew Morton, Thomas Gleixner,
linux-kernel
Hugh Dickins wrote:
> I've now noticed that the machine I call MPENTIUM4 for 32-bit kernels
> is called MPSC for 64-bit kernels, and in that case it still doesn't
> get the P6 NOPs which I'm guessing it ought to (yeah, I'm so excited
> about the speedup I can expect from P6 NOPs, can we perhaps have a
> little silvery "Using Genuine P6 NOPs" sticker to put on the box? ;)
>
> I'm suspecting that the patch below is actually wrong, and that it's
> really the "(X86_64 || !X86_GENERIC) &&" which should be changed;
> but very unsure of my ground and what's right for CPU_GENERIC -
> the 32/64 heritage of x86/Kconfig.cpu rather confuses me.
>
> Over to you to do the right thing, I'm hoping, please, Peter!
>
X86_64 && !X86_GENERIC comes from not wanting to be a compatibility
issue when compiling for generic CPUs. There are some 32-bit otherwise
i686-compatible chips (from VIA and Transmeta) which don't have these NOPs.
-hpa
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: P6 NOPs again: MPSC?
2008-03-10 20:17 ` H. Peter Anvin
@ 2008-03-10 22:02 ` Hugh Dickins
2008-03-11 6:43 ` H. Peter Anvin
2008-03-11 9:28 ` Ingo Molnar
0 siblings, 2 replies; 11+ messages in thread
From: Hugh Dickins @ 2008-03-10 22:02 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Ingo Molnar, Linus Torvalds, Andrew Morton, Thomas Gleixner,
linux-kernel
On Mon, 10 Mar 2008, H. Peter Anvin wrote:
> Hugh Dickins wrote:
> >
> > I'm suspecting that the patch below is actually wrong, and that it's
> > really the "(X86_64 || !X86_GENERIC) &&" which should be changed;
> > but very unsure of my ground and what's right for CPU_GENERIC -
> > the 32/64 heritage of x86/Kconfig.cpu rather confuses me.
>
> X86_64 && !X86_GENERIC comes from not wanting to be a compatibility issue when
> compiling for generic CPUs. There are some 32-bit otherwise i686-compatible
> chips (from VIA and Transmeta) which don't have these NOPs.
Yup, I realized that (with || in place of &&): I meant that perhaps
it was supposed to say X86_64 || (!X86_GENERIC && (M686 || ....))
since quite a lot of other options there have "|| X86_64" to cover
all the 64-bit possibilities at once i.e. is it only MPSC that
needs to be added, or both MPSC and CPU_GENERIC?
(But I've lost my way around here. A good example of the 32/64
confusion is how one has to remember that X86_GENERIC is peculiar
to 32-bit, and CPU_GENERIC peculiar to 64-bit. And CPU_GENERIC is
understandably an alternative to the specific 64-bit models, but
X86_GENERIC is strangely in addition to the specific 32-bit models.)
Hugh
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: P6 NOPs again: MPSC?
2008-03-10 22:02 ` Hugh Dickins
@ 2008-03-11 6:43 ` H. Peter Anvin
2008-03-11 14:00 ` Hugh Dickins
2008-03-11 9:28 ` Ingo Molnar
1 sibling, 1 reply; 11+ messages in thread
From: H. Peter Anvin @ 2008-03-11 6:43 UTC (permalink / raw)
To: Hugh Dickins
Cc: Ingo Molnar, Linus Torvalds, Andrew Morton, Thomas Gleixner,
linux-kernel
Hugh Dickins wrote:
>
> Yup, I realized that (with || in place of &&): I meant that perhaps
> it was supposed to say X86_64 || (!X86_GENERIC && (M686 || ....))
> since quite a lot of other options there have "|| X86_64" to cover
> all the 64-bit possibilities at once i.e. is it only MPSC that
> needs to be added, or both MPSC and CPU_GENERIC?
>
No. The left-hand clause (X86_64 || !X86_GENERIC) indicates when using
these NOPs are *permitted*; the right-hand clause indicates when doing
so is *desirable*. The latter isn't, for example, for K8, even on 64 bits.
-hpa
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: P6 NOPs again: MPSC?
2008-03-10 22:02 ` Hugh Dickins
2008-03-11 6:43 ` H. Peter Anvin
@ 2008-03-11 9:28 ` Ingo Molnar
2008-03-11 13:45 ` Hugh Dickins
1 sibling, 1 reply; 11+ messages in thread
From: Ingo Molnar @ 2008-03-11 9:28 UTC (permalink / raw)
To: Hugh Dickins
Cc: H. Peter Anvin, Linus Torvalds, Andrew Morton, Thomas Gleixner,
linux-kernel
* Hugh Dickins <hugh@veritas.com> wrote:
> (But I've lost my way around here. A good example of the 32/64
> confusion is how one has to remember that X86_GENERIC is peculiar to
> 32-bit, and CPU_GENERIC peculiar to 64-bit. And CPU_GENERIC is
> understandably an alternative to the specific 64-bit models, but
> X86_GENERIC is strangely in addition to the specific 32-bit models.)
yes - this is one of the arbitrary deviations between 32-bit and 64-bit.
Patches to bring the concepts and names in sync are welcome :-)
Ingo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: P6 NOPs again: MPSC?
2008-03-11 9:28 ` Ingo Molnar
@ 2008-03-11 13:45 ` Hugh Dickins
0 siblings, 0 replies; 11+ messages in thread
From: Hugh Dickins @ 2008-03-11 13:45 UTC (permalink / raw)
To: Ingo Molnar
Cc: H. Peter Anvin, Linus Torvalds, Andrew Morton, Thomas Gleixner,
linux-kernel
On Tue, 11 Mar 2008, Ingo Molnar wrote:
> * Hugh Dickins <hugh@veritas.com> wrote:
>
> > (But I've lost my way around here. A good example of the 32/64
> > confusion is how one has to remember that X86_GENERIC is peculiar to
> > 32-bit, and CPU_GENERIC peculiar to 64-bit. And CPU_GENERIC is
> > understandably an alternative to the specific 64-bit models, but
> > X86_GENERIC is strangely in addition to the specific 32-bit models.)
>
> yes - this is one of the arbitrary deviations between 32-bit and 64-bit.
> Patches to bring the concepts and names in sync are welcome :-)
:-) I durst not!
Hugh
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: P6 NOPs again: MPSC?
2008-03-11 6:43 ` H. Peter Anvin
@ 2008-03-11 14:00 ` Hugh Dickins
0 siblings, 0 replies; 11+ messages in thread
From: Hugh Dickins @ 2008-03-11 14:00 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Ingo Molnar, Linus Torvalds, Andrew Morton, Thomas Gleixner,
linux-kernel
On Tue, 11 Mar 2008, H. Peter Anvin wrote:
> Hugh Dickins wrote:
> >
> > Yup, I realized that (with || in place of &&): I meant that perhaps
> > it was supposed to say X86_64 || (!X86_GENERIC && (M686 || ....))
> > since quite a lot of other options there have "|| X86_64" to cover
> > all the 64-bit possibilities at once i.e. is it only MPSC that
> > needs to be added, or both MPSC and CPU_GENERIC?
>
> No. The left-hand clause (X86_64 || !X86_GENERIC) indicates when using these
> NOPs are *permitted*; the right-hand clause indicates when doing so is
> *desirable*. The latter isn't, for example, for K8, even on 64 bits.
Okay, so if we're to exclude CPU_GENERIC and MK8, I think that
makes my original patch the right one: here it is with a signoff.
I've now noticed that the machine I call MPENTIUM4 for 32-bit kernels
is called MPSC for 64-bit kernels, and in that case it still doesn't
get the P6 NOPs it ought to. hpa explains that MK8 should still be
excluded, so it's just a matter of including MPSC along with MPENTIUM4.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
--- 2.6.25-rc5/arch/x86/Kconfig.cpu 2008-03-05 11:27:23.000000000 +0000
+++ linux/arch/x86/Kconfig.cpu 2008-03-10 18:48:10.000000000 +0000
@@ -388,7 +388,7 @@ config X86_OOSTORE
#
config X86_P6_NOP
def_bool y
- depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4)
+ depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4 || MPSC)
config X86_TSC
def_bool y
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-03-11 20:58 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-04 19:33 [PATCH] x86: a P4 is a P6 not an i486 Hugh Dickins
2008-03-04 21:01 ` Ingo Molnar
2008-03-04 21:24 ` H. Peter Anvin
2008-03-04 21:32 ` Ingo Molnar
2008-03-10 19:14 ` P6 NOPs again: MPSC? Hugh Dickins
2008-03-10 20:17 ` H. Peter Anvin
2008-03-10 22:02 ` Hugh Dickins
2008-03-11 6:43 ` H. Peter Anvin
2008-03-11 14:00 ` Hugh Dickins
2008-03-11 9:28 ` Ingo Molnar
2008-03-11 13:45 ` Hugh Dickins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).