Re: [PATCH] 2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations

From: Thomas Horsten (thomas@horsten.com)
Date: Wed May 07 2003 - 16:02:16 EST


Also the patch got wordwrapped since I had to resend it from my shell account (it got eaten by the linux-kernel filter the first time for some obscure reason)..

So here it is again, also with the typo fixed that Ken pointed out. Comments received with thanks.

diff -r -u linux-2.5.69.orig/arch/i386/Kconfig linux-2.5.69/arch/i386/Kconfig
--- linux-2.5.69.orig/arch/i386/Kconfig 2003-05-05 00:53:02.000000000 +0100
+++ linux-2.5.69/arch/i386/Kconfig 2003-05-07 18:00:11.000000000 +0100
@@ -273,6 +273,48 @@
 
 endchoice
 
+#
+# Select the exact K7 model for optimization purposes
+#
+choice
+ prompt "K7 Model Selection"
+ depends on MK7
+ default K7_STD
+
+config K7_STD
+ bool "Standard Athlon/Duron/Other"
+ help
+ Select this if you have a standard Athlon or Duron processor, or
+ another varian that is not listed below. Kernels compiled with this
+ option should work on a system that uses any member of the K7 family
+ of processors.
+
+config K7_TBIRD
+ bool "Athlon Thunderbird"
+ help
+ Select this if you have the "Thunderbird" version of the Athlon CPU,
+ to enable optimizations specific to that processor.
+
+config K7_ATHLON4
+ bool "Athlon 4 (Palomino)"
+ help
+ Select this if you have an Athlon 4 CPU, also known as "Palomino",
+ to enable optimizations specific to that processor.
+
+config K7_ATHLONXP
+ bool "Athlon XP"
+ help
+ Select this if you have an Athlon XP CPU, to enable optimizations
+ specific to that processor.
+
+config K7_ATHLONMP
+ bool "Athlon MP"
+ help
+ Select this if you have an Athlon MP CPU, to enable optimizations
+ specific to that processor.
+
+endchoice
+
 config X86_GENERIC
        bool "Generic x86 support"
        help
diff -r -u linux-2.5.69.orig/arch/i386/Makefile linux-2.5.69/arch/i386/Makefile
--- linux-2.5.69.orig/arch/i386/Makefile 2003-05-05 00:53:12.000000000 +0100
+++ linux-2.5.69/arch/i386/Makefile 2003-05-07 18:10:08.000000000 +0100
@@ -39,7 +39,11 @@
 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_MK7) += $(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4)
+cflags-$(CONFIG_K7_STD) += $(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4)
+cflags-$(CONFIG_K7_TBIRD) += $(call check_gcc,-march=athlon-tbird,$(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4))
+cflags-$(CONFIG_K7_ATHLON4) += $(call check_gcc,-march=athlon-4,$(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4))
+cflags-$(CONFIG_K7_ATHLONXP) += $(call check_gcc,-march=athlon-xp,$(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4))
+cflags-$(CONFIG_K7_ATHLONMP) += $(call check_gcc,-march=athlon-mp,$(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
 cflags-$(CONFIG_MWINCHIPC6) += $(call check_gcc,-march=winchip-c6,-march=i586)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 07 2003 - 22:00:33 EST