K6-II/K6-II: enable X86_USE_3DNOW
RFC PATCH 1/1 K6-II/K6-II: enable X86_USE_3DNOW
If my patch is wrong and this is a RTFM please give me a hint where to find the "M".
The AMD K6-II and K6-III do support 3DNow!
The patch below adds a new option for the AMD K6-II and K6-III and enables CONFIG_X86_USE_3DNOW.
I'm currently running 2.5.67 with this patch applied on my K6-II.
Questions:
Is it really correct to enable CONFIG_X86_USE_3DNOW? Is the -march=k6-2 correct?
TIA
Adrian
arch/i386/Kconfig renamed from arch/i386/Kconfig.old +17 -9
@@ -128,7 +128,8 @@ - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron. - "Pentium-III" for the Intel Pentium III or Coppermine Celeron. - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron. - - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D). + - "K6" for the AMD K6. + - "K6_2" for the AMD K6-II and K6-III (aka K6-3D). - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird). - "Crusoe" for the Transmeta Crusoe series. - "Winchip-C6" for original IDT Winchip.
@@ -200,12 +201,19 @@ optimizations. config MK6 - bool "K6/K6-II/K6-III" + bool "K6" help - Select this for an AMD K6-family processor. Enables use of - some extended instructions, and passes appropriate optimization + Select this for an AMD K6 processor. Enables use of some + extended instructions, and passes appropriate optimization flags to GCC. +config MK6_2 + bool "K6-II/K6-III" + help + Select this for an AMD K6-II and K6-III processors. Enables + use of some extended instructions, and passes appropriate + optimization flags to GCC. + config MK7 bool "Athlon/Duron/K7" help
@@ -289,7 +297,7 @@ config X86_L1_CACHE_SHIFT int default "4" if MELAN || M486 || M386 - default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 + default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MCYRIXIII || MK6 || MK6_2 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 default "6" if MK7 || MK8 default "7" if MPENTIUM4
@@ -335,7 +343,7 @@ config X86_ALIGNMENT_16 bool - depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 + depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || MK6_2 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 default y config X86_GOOD_APIC
@@ -350,12 +358,12 @@ config X86_USE_PPRO_CHECKSUM bool - depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 + depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MK6_2 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 default y config X86_USE_3DNOW bool - depends on MCYRIXIII || MK7 + depends on MCYRIXIII || MK6_2 || MK7 default y config X86_OOSTORE
@@ -478,7 +486,7 @@ config X86_TSC bool - depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2) && !X86_NUMAQ + depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MCYRIXIII || MK7 || MK6 || MK6_2 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2) && !X86_NUMAQ default y config X86_MCE
arch/i386/Makefile renamed from arch/i386/Makefile.old +1 -0
@@ -39,6 +39,7 @@ cflags-$(CONFIG_MPENTIUMIII) += $(call check_gcc,-march=pentium3,-march=i686) cflags-$(CONFIG_MPENTIUM4) += $(call check_gcc,-march=pentium4,-march=i686) cflags-$(CONFIG_MK6) += $(call check_gcc,-march=k6,-march=i586) +cflags-$(CONFIG_MK6_2) += $(call check_gcc,-march=k6-2,-march=i586) cflags-$(CONFIG_MK7) += $(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4) cflags-$(CONFIG_MK8) += $(call check_gcc,-march=k8,$(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4)) cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
include/asm-i386/module.h renamed from include/asm-i386/module.h.old +2 -0
@@ -30,6 +30,8 @@#define MODULE_PROC_FAMILY "PENTIUM4 "#elif definedCONFIG_MK6 #define MODULE_PROC_FAMILY "K6 " +#elif definedCONFIG_MK6_2 +#define MODULE_PROC_FAMILY "K6II "#elif definedCONFIG_MK7 #define MODULE_PROC_FAMILY "K7 "#elif definedCONFIG_MK8
Quoted 4 lines · Adrian Bunk
If my patch is wrong and this is a RTFM please give me a hint where to find the "M".
The AMD K6-II and K6-III do support 3DNow!
The 3dnow memory copies aren't a win on anything
earlier than an Athlon iirc.
Dave
Quoted 8 lines · Dave Jones
Quoted 4 lines · Adrian Bunk
If my patch is wrong and this is a RTFM please give me a hint where to find the "M".
The AMD K6-II and K6-III do support 3DNow!
The 3dnow memory copies aren't a win on anything
earlier than an Athlon iirc.
Under 1% on a K6. The processor is so horribly memory bound the actual copy function is borderline irrelevant. If its not in the K6-III cache its not arriving in a hurry
Quoted 5 lines · Alan Cox
Quoted 4 lines · Dave Jones
Quoted 3 lines · Adrian Bunk
If my patch is wrong and this is a RTFM please give me a hint where to find the "M".
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
The AMD K6-II and K6-III do support 3DNow!
The 3dnow memory copies aren't a win on anything
earlier than an Athlon iirc.Under 1% on a K6. The processor is so horribly memory bound the actual copy function is borderline irrelevant. If its not in the K6-III cache its not arriving in a hurry
Ah thanks, this is the information I didn't know.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 2 lines · Adrian Bunk
If my patch is wrong and this is a RTFM please give me a hint where to find the "M".
Patch looks right...
Quoted 2 lines
Questions:
Is it really correct to enableCONFIG_X86_USE_3DNOW?
If you are right that the K6-2 and K6-3D support 3DNow!, then yes. At least its "correct" but it may not be optimal: I seem to recall 3DNow memory copies were not worthwhile on anything before an Athlon. Double check that, though.
Quoted 1 line
Is the -march=k6-2 correct?
Yes. Even if the above is true, splitting the K6 out like this is useful for the extra -march here. It certainly does not hurt (picking the original K6 will give proper support for the whole family, in needed).
Robert Love
Quoted 2 lines · Robert Love
Quoted 1 line
Questions: Is it really correct to enable
CONFIG_X86_USE_3DNOW?If you are right that the K6-2 and K6-3D support 3DNow!, then yes.
Yes, it does.
Signature · 4 lines
pozdr. Paweł Gołaszewski --------------------------------- worth to see: http://www.againsttcpa.com/ CPU not found - software emulation...
Quoted 7 lines · Robert Love
Quoted 2 lines · Adrian Bunk
If my patch is wrong and this is a RTFM please give me a hint where to find the "M".
Patch looks right...
Quoted 7 lines
Quoted 2 lines
Questions:
Is it really correct to enableCONFIG_X86_USE_3DNOW?If you are right that the K6-2 and K6-3D support 3DNow!, then yes. At least its "correct" but it may not be optimal: I seem to recall 3DNow memory copies were not worthwhile on anything before an Athlon. Double check that, though.
It does, but Alan already explained why it doesn't make a difference.
Quoted 8 lines
Quoted 1 line
Is the -march=k6-2 correct?
Yes. Even if the above is true, splitting the K6 out like this is useful for the extra -march here. It certainly does not hurt (picking the original K6 will give proper support for the whole family, in needed).
From a quick look of the gcc-3.2.2 sources it seems that except for the
3DNow! support gcc doesn't differenciate between K6 and K6-II, so this change alone doesn't seem to make it worth adding a new processor type.
Quoted 1 line
Robert Love
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed