Remove unnecessary code in 64bit CPU identification.
There were no 64bit Transmeta CPUs made (and it'd be something of
a surprise if they started any time soon). To the best of my knowledge,
no CPU vendor cloned the 80860000 cpuid space claimed by Transmeta. By removing this code, we can also eliminate calling cpuid 0x80000007 twice.
arch/x86/kernel/setup_64.c +2 -11
@@ -1042,20 +1042,11 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) }if (xlvl >=0x80000004 )get_model_name (c);/* Default name */ - } -/* Transmeta-defined flags: level 0x80860001 */ - xlvl =cpuid_eax (0x80860000 ); -if ((xlvl &0xffff0000 ) ==0x80860000 ) { -/* Don't set x86_cpuid_level here for now to not confuse. */ -if (xlvl >=0x80860001 ) - c->x86_capability[2 ] =cpuid_edx (0x80860001 ); +if (xlvl >=0x80000007 ) + c->x86_power =cpuid_edx (0x80000007 ); } - c->extended_cpuid_level =cpuid_eax (0x80000000 ); -if (c->extended_cpuid_level >=0x80000007 ) - c->x86_power =cpuid_edx (0x80000007 ); -switch (c->x86_vendor) {case X86_VENDOR_AMD :early_init_amd (c);
Quoted 4 lines · Dave Jones
There were no 64bit Transmeta CPUs made (and it'd be something of
a surprise if they started any time soon). To the best of my knowledge,
no CPU vendor cloned the 80860000 cpuid space claimed by Transmeta. By removing this code, we can also eliminate calling cpuid0x80000007twice.
argh, after reading this a dozen times, I send it, and then notice a typo. That should be ' eliminate calling cpuid 0x80000000 twice'
Dave
Signature · 1 line
http://www.codemonkey.org.uk
H. Peter Anvin
reviewerQuoted 6 lines · Dave Jones
There were no 64bit Transmeta CPUs made (and it'd be something of
a surprise if they started any time soon). To the best of my knowledge,
no CPU vendor cloned the 80860000 cpuid space claimed by Transmeta. By removing this code, we can also eliminate calling cpuid0x80000007twice.Signed-off-by Dave Jones <[email protected]>
I'd really like to avoid divergences between the 32-bit and 64-bit code if they can be avoided at this point. These codes need to be unified, not further split.
-hpa
Quoted 11 lines · H. Peter Anvin
Quoted 6 lines · Dave Jones
There were no 64bit Transmeta CPUs made (and it'd be something of
a surprise if they started any time soon). To the best of my knowledge,
no CPU vendor cloned the 80860000 cpuid space claimed by Transmeta. By removing this code, we can also eliminate calling cpuid0x80000007twice.Signed-off-by Dave Jones <[email protected]>I'd really like to avoid divergences between the 32-bit and 64-bit code if they can be avoided at this point. These codes need to be unified, not further split.
Umm, the 32 bit code has the per-vendor stuff removed from setup.c, and factored out into per-vendor files in arch/x86/kernel/cpu/ Because the 64bit version doesn't do that (yet), my removal of this code actually gets us closer to unification. After my patch, neither of the setup.c files have the Transmeta bits :)
Dave
Signature · 1 line
http://www.codemonkey.org.uk
H. Peter Anvin
reviewerQuoted 9 lines · Dave Jones
Quoted 8 lines · H. Peter Anvin
Quoted 6 lines · Dave Jones
There were no 64bit Transmeta CPUs made (and it'd be something of
a surprise if they started any time soon). To the best of my knowledge,
no CPU vendor cloned the 80860000 cpuid space claimed by Transmeta. By removing this code, we can also eliminate calling cpuid0x80000007twice.Signed-off-by Dave Jones <[email protected]>
Quoted 9 lines
Quoted 3 lines
I'd really like to avoid divergences between the 32-bit and 64-bit code if they can be avoided at this point. These codes need to be unified, not further split.
Umm, the 32 bit code has the per-vendor stuff removed from
setup.c, and factored out into per-vendor files inarch/x86/kernel/cpu/Because the 64bit version doesn't do that (yet), my removal of this code actually gets us closer to unification. After my patch, neither of thesetup.cfiles have the Transmeta bits :)
*Shrug* ... it seems like pointless churn to code that really needs to die to me.
-hpa
Quoted 14 lines · H. Peter Anvin
Quoted 13 lines · Dave Jones
Quoted 11 lines · H. Peter Anvin
Quoted 6 lines · Dave Jones
There were no 64bit Transmeta CPUs made (and it'd be something of
a surprise if they started any time soon). To the best of my knowledge,
no CPU vendor cloned the 80860000 cpuid space claimed by Transmeta. By removing this code, we can also eliminate calling cpuid0x80000007twice.Signed-off-by Dave Jones <[email protected]>I'd really like to avoid divergences between the 32-bit and 64-bit code if they can be avoided at this point. These codes need to be unified, not further split.
Quoted 8 lines
Quoted 5 lines
Umm, the 32 bit code has the per-vendor stuff removed from
setup.c, and factored out into per-vendor files inarch/x86/kernel/cpu/Because the 64bit version doesn't do that (yet), my removal of this code actually gets us closer to unification. After my patch, neither of thesetup.cfiles have the Transmeta bits :)*Shrug* ... it seems like pointless churn to code that really needs to die to me.
setup_64.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
It's a slow death, but it's easier to chip away at the obvious parts..
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 14 lines · H. Peter Anvin
Quoted 13 lines · Dave Jones
Quoted 11 lines · H. Peter Anvin
Quoted 6 lines · Dave Jones
There were no 64bit Transmeta CPUs made (and it'd be something of
a surprise if they started any time soon). To the best of my knowledge,
no CPU vendor cloned the 80860000 cpuid space claimed by Transmeta. By removing this code, we can also eliminate calling cpuid0x80000007twice.Signed-off-by Dave Jones <[email protected]>I'd really like to avoid divergences between the 32-bit and 64-bit code if they can be avoided at this point. These codes need to be unified, not further split.
Quoted 8 lines
Quoted 5 lines
Umm, the 32 bit code has the per-vendor stuff removed from
setup.c, and factored out into per-vendor files inarch/x86/kernel/cpu/Because the 64bit version doesn't do that (yet), my removal of this code actually gets us closer to unification. After my patch, neither of thesetup.cfiles have the Transmeta bits :)*Shrug* ... it seems like pointless churn to code that really needs to die to me.
Moving along the same direction.. Moving the vendor specific bits out of setup_64.c into cpu/ would go a long way towards killing of setup64.c. I took a first pass at doing this in the diff below. So far I only looked at the AMD specific bits, and haven't done a complete conversion to cpu_dev style initialisation as done on 32bit, but that can easily be performed later after moving all the code out into its respective places. (downside: a bunch of externs in the interim).
comments on this before I go any further?
Dave
arch/x86/kernel/cpu/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-y += proc.o feature_names.o obj-$(CONFIG_X86_32) += common.o bugs.o obj-$(CONFIG_X86_32) += amd.o +obj-$(CONFIG_X86_64) += amd_64.o obj-$(CONFIG_X86_32) += cyrix.o obj-$(CONFIG_X86_32) += centaur.o obj-$(CONFIG_X86_32) += transmeta.o
arch/x86/kernel/cpu/amd_64.c new file +252 -0
252 lines not on this page · raw message
arch/x86/kernel/setup_64.c +6 -225
261 lines not on this page · raw message
Signature · 1 line
http://www.codemonkey.org.uk
H. Peter Anvin
reviewerQuoted 10 lines · Dave Jones
Moving along the same direction.. Moving the vendor specific bits out of
setup_64.cinto cpu/ would go a long way towards killing ofsetup64.c. I took a first pass at doing this in the diff below. So far I only looked at the AMD specific bits, and haven't done a complete conversion tocpu_devstyle initialisation as done on 32bit, but that can easily be performed later after moving all the code out into its respective places. (downside: a bunch of externs in the interim).comments on this before I go any further?
Looks good to me at first glance, and would definitely be a good step on the way.
-hpa
H. Peter Anvin
reviewerQuoted 10 lines · Dave Jones
Moving along the same direction.. Moving the vendor specific bits out of
setup_64.cinto cpu/ would go a long way towards killing ofsetup64.c. I took a first pass at doing this in the diff below. So far I only looked at the AMD specific bits, and haven't done a complete conversion tocpu_devstyle initialisation as done on 32bit, but that can easily be performed later after moving all the code out into its respective places. (downside: a bunch of externs in the interim).comments on this before I go any further?
Hi Dave,
I was going to pull this into -tip, but I need a Signed-off-by: line in order to do so. Could you resend this so we can add it to -tip?
-hpa
Quoted 9 lines · H. Peter Anvin
Quoted 8 lines · Dave Jones
Moving along the same direction.. Moving the vendor specific bits out of
setup_64.cinto cpu/ would go a long way towards killing ofsetup64.c. I took a first pass at doing this in the diff below. So far I only looked at the AMD specific bits, and haven't done a complete conversion tocpu_devstyle initialisation as done on 32bit, but that can easily be performed later after moving all the code out into its respective places. (downside: a bunch of externs in the interim).
Quoted 7 lines
Quoted 2 lines
comments on this before I go any further?
Hi Dave,
I was going to pull this into -tip, but I need a Signed-off-by: line in order to do so. Could you resend this so we can add it to -tip?
Yeah, I was going to rediff against tip and resend them, but I went into the office instead yesterday, where nothing productive ever happens :-)
I'll get to it today.
Dave
Signature · 1 line
http://www.codemonkey.org.uk