public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations
@ 2003-05-07 19:28 Thomas Horsten
  2003-05-07 20:06 ` Ken Witherow
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Horsten @ 2003-05-07 19:28 UTC (permalink / raw)
  To: linux-kernel

Hi all,

I made this patch to support the various K7 model-specific optimizations that
 the later GCC compilers can use.

Please have a look, and pass me any comments.

I also have the same patch for 2.4, if you are interested it's available on
 my Linux page on http://www.infowares.com/linux

// Thomas

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 XP 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)


^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <200305071834.26789.thomas@horsten.com>]
* Re: [PATCH] 2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations
@ 2003-05-14 16:49 Ray Lee
  2003-05-14 17:06 ` Dave Jones
  0 siblings, 1 reply; 9+ messages in thread
From: Ray Lee @ 2003-05-14 16:49 UTC (permalink / raw)
  To: thomas, davej; +Cc: Linux Kernel

Dave Jones wrote:

> On Wed, May 07, 2003 at 06:34:26PM +0100, Thomas Horsten wrote:
>> Please have a look, and pass me any comments.

> I don't think this is worth the extra complication. The potential wins
> (if any) outweigh the confusion to users who might have no clue as to 
> what core they have. 

How's about a "This CPU" option instead, a la gcccpuopt [1], that sets
the correct CPU options for the current machine/gcc combo?

[1] http://google.com/search?q=gcccpuopt

Ray


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-05-14 18:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-07 19:28 [PATCH] 2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations Thomas Horsten
2003-05-07 20:06 ` Ken Witherow
2003-05-07 20:44   ` Thomas Horsten
2003-05-07 21:02     ` Thomas Horsten
     [not found] <200305071834.26789.thomas@horsten.com>
2003-05-14 14:04 ` Dave Jones
2003-05-14 18:40   ` Thomas Horsten
2003-05-14 18:55     ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2003-05-14 16:49 Ray Lee
2003-05-14 17:06 ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox