Permalink
Browse files

added support for AMD K10 (march=amdfam10)

  • Loading branch information...
1 parent 006b7eb commit 249b9192747861a4b7de0776780bde8f69fd66b6 @graysky2 committed Jan 2, 2013
Showing with 39 additions and 27 deletions.
  1. +39 −27 kernel-37-gcc47-1.patch → kernel-37-gcc47-2.patch
@@ -1,4 +1,4 @@
-This patch was written by jeroen@linuxforge.net
+The original patch was written by jeroen@linuxforge.net
Benchmarks by graysky
@@ -29,17 +29,17 @@ Discussion:
*Pair-wise analysis by Tukey-Kramer shows significance at the 0.05 level for all CPUs compared.
Below are the differences in median values:
-core2 +87.5 ms
-corei7-avx +79.7 ms
-core-avx-i +257.2 ms
+core2 +87.5 ms
+corei7-avx +79.7 ms
+core-avx-i +257.2 ms
References:
Bash script that controls the benchmark: https://github.com/graysky2/bin/blob/master/bench
Log file generated by script: http://repo-ck.com/bench/compile_time_optimization.txt.gz
---
---- linux-3.7/arch/x86/include/asm/module.h 2012-04-29 18:43:58.239336240 -0700
-+++ linux-3.7.mod/arch/x86/include/asm/module.h 2012-04-29 18:43:41.609545221 -0700
+--- linux-3.7/arch/x86/include/asm/module.h 2012-12-10 22:30:57.000000000 -0500
++++ linux-3.7.mod/arch/x86/include/asm/module.h 2013-01-02 08:24:39.225359956 -0500
@@ -17,6 +17,14 @@
#define MODULE_PROC_FAMILY "586MMX "
#elif defined CONFIG_MCORE2
@@ -55,10 +55,12 @@ Log file generated by script: http://repo-ck.com/bench/compile_time_optimization
#elif defined CONFIG_MATOM
#define MODULE_PROC_FAMILY "ATOM "
#elif defined CONFIG_M686
-@@ -35,6 +43,14 @@
+@@ -35,6 +43,16 @@
#define MODULE_PROC_FAMILY "K7 "
#elif defined CONFIG_MK8
#define MODULE_PROC_FAMILY "K8 "
++#elif defined CONFIG_MK10
++#define MODULE_PROC_FAMILY "K10 "
+#elif defined CONFIG_MBARCELONA
+#define MODULE_PROC_FAMILY "BARCELONA "
+#elif defined CONFIG_MBOBCAT
@@ -70,8 +72,8 @@ Log file generated by script: http://repo-ck.com/bench/compile_time_optimization
#elif defined CONFIG_MELAN
#define MODULE_PROC_FAMILY "ELAN "
#elif defined CONFIG_MCRUSOE
---- linux-3.7/arch/x86/Kconfig.cpu 2012-04-29 18:43:58.249336198 -0700
-+++ linux-3.7.mod/arch/x86/Kconfig.cpu 2012-04-29 18:40:46.091751798 -0700
+--- linux-3.7/arch/x86/Kconfig.cpu 2012-12-10 22:30:57.000000000 -0500
++++ linux-3.7.mod/arch/x86/Kconfig.cpu 2013-01-02 08:36:23.914858428 -0500
@@ -147,7 +147,7 @@
@@ -90,7 +92,7 @@ Log file generated by script: http://repo-ck.com/bench/compile_time_optimization
depends on X86_32
---help---
Select this for an AMD Athlon K7-family processor. Enables use of
-@@ -163,12 +163,40 @@
+@@ -163,12 +163,48 @@
flags to GCC.
config MK8
@@ -101,6 +103,14 @@ Log file generated by script: http://repo-ck.com/bench/compile_time_optimization
Enables use of some extended instructions, and passes appropriate
optimization flags to GCC.
++config MK10
++ bool "AMD 61xx/7x50/PhenomX3/X4/II/K10"
++ ---help---
++ Select this for an AMD 61xx Eight-Core Magny-Cours, Athlon X2 7x50,
++ Phenom X3/X4/II, Athlon II X2/X3/X4, or Turion II-family processor.
++ Enables use of some extended instructions, and passes appropriate
++ optimization flags to GCC.
++
+config MBARCELONA
+ bool "AMD Barcelona"
+ ---help---
@@ -132,7 +142,7 @@ Log file generated by script: http://repo-ck.com/bench/compile_time_optimization
config MCRUSOE
bool "Crusoe"
depends on X86_32
-@@ -260,7 +288,7 @@
+@@ -260,7 +296,7 @@
in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.
config MCORE2
@@ -141,7 +151,7 @@ Log file generated by script: http://repo-ck.com/bench/compile_time_optimization
---help---
Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
-@@ -268,6 +296,41 @@
+@@ -268,6 +304,41 @@
family in /proc/cpuinfo. Newer ones have 6 and older ones 15
(not a typo)
@@ -183,35 +193,35 @@ Log file generated by script: http://repo-ck.com/bench/compile_time_optimization
config MATOM
bool "Intel Atom"
---help---
-@@ -312,7 +375,7 @@
+@@ -312,7 +383,7 @@
config X86_L1_CACHE_SHIFT
int
default "7" if MPENTIUM4 || MPSC
- default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
-+ default "6" if MK7 || MK8 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MPENTIUMM || MCORE2 || MCOREI7 || MCOREI7AVX || MCOREAVXI || MCOREAVX2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
++ default "6" if MK7 || MK8 || MK10 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MPENTIUMM || MCORE2 || MCOREI7 || MCOREI7AVX || MCOREAVXI || MCOREAVX2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
default "4" if MELAN || M486 || M386 || MGEODEGX1
default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
-@@ -363,11 +426,11 @@
+@@ -363,11 +434,11 @@
config X86_INTEL_USERCOPY
def_bool y
- depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2
-+ depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MBARCELONA || MEFFICEON || MCORE2 || MCOREI7 || MCOREI7AVX || MCOREAVXI || MCOREAVX2
++ depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MK10 || MBARCELONA || MEFFICEON || MCORE2 || MCOREI7 || MCOREI7AVX || MCOREAVXI || MCOREAVX2
config X86_USE_PPRO_CHECKSUM
def_bool y
- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM
-+ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MCOREI7 || MCOREI7AVX || MCOREAVXI || MCOREAVX2 || MATOM
++ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MK10 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MCOREI7 || MCOREI7AVX || MCOREAVXI || MCOREAVX2 || MATOM
config X86_USE_3DNOW
def_bool y
-@@ -395,17 +458,17 @@
+@@ -395,17 +466,17 @@
config X86_TSC
def_bool y
- depends on ((MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) && !X86_NUMAQ) || X86_64
-+ depends on ((MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MCOREI7 || MCOREI7-AVX || MATOM) && !X86_NUMAQ) || X86_64
++ depends on ((MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MK10 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MCOREI7 || MCOREI7-AVX || MATOM) && !X86_NUMAQ) || X86_64
config X86_CMPXCHG64
def_bool y
@@ -223,16 +233,17 @@ Log file generated by script: http://repo-ck.com/bench/compile_time_optimization
config X86_CMOV
def_bool y
- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
-+ depends on (MK8 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MK7 || MCORE2 || MCOREI7 || MCOREI7AVX || MCOREAVXI || MCOREAVX2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
++ depends on (MK8 || MK10 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MK7 || MCORE2 || MCOREI7 || MCOREI7AVX || MCOREAVXI || MCOREAVX2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
config X86_MINIMUM_CPU_FAMILY
int
---- linux-3.7/arch/x86/Makefile 2012-04-29 18:43:58.249336198 -0700
-+++ linux-3.7.mod/arch/x86/Makefile 2012-04-29 18:41:51.260932642 -0700
-@@ -51,10 +51,22 @@
+--- linux-3.7/arch/x86/Makefile 2012-12-10 22:30:57.000000000 -0500
++++ linux-3.7.mod/arch/x86/Makefile 2013-01-02 08:39:20.199840158 -0500
+@@ -58,10 +58,23 @@
# FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
++ cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10)
+ cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona)
+ cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1)
+ cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1)
@@ -253,20 +264,21 @@ Log file generated by script: http://repo-ck.com/bench/compile_time_optimization
cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
---- linux-3.7/arch/x86/Makefile_32.cpu 2012-04-29 18:43:58.269335977 -0700
-+++ linux-3.7.mod/arch/x86/Makefile_32.cpu 2012-04-29 18:42:39.120330975 -0700
-@@ -25,6 +25,10 @@
+--- linux-3.7/arch/x86/Makefile_32.cpu 2012-12-10 22:30:57.000000000 -0500
++++ linux-3.7.mod/arch/x86/Makefile_32.cpu 2013-01-02 08:41:23.554252806 -0500
+@@ -25,6 +25,11 @@
# They make zero difference whatsosever to performance at this time.
cflags-$(CONFIG_MK7) += -march=athlon
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)
++cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10,-march=athlon)
+cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona,-march=athlon)
+cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1,-march=athlon)
+cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1,-march=athlon)
+cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2,-march=athlon)
cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
-@@ -33,6 +37,10 @@
+@@ -33,6 +38,10 @@
cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
cflags-$(CONFIG_MVIAC7) += -march=i686
cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)

0 comments on commit 249b919

Please sign in to comment.