2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations

2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations

Post by Thomas Horste » Thu, 08 May 2003 21:40:09



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

 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 +++


 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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations

Post by Ken Withero » Thu, 08 May 2003 22:20:11



> +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.

I do believe Athlon XP when you mean MP is a copy/paste typo :)

--
       Ken Witherow <phantoml AT rochester.rr.com>
           ICQ: 21840670  AIM: phantomlordken
               http://www.krwtech.com/ken

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations

Post by Thomas Horste » Thu, 08 May 2003 22:50:10



Quote:> > +config K7_ATHLONMP
> > +     bool "Athlon MP"
> > +     help
> > +       Select this if you have an Athlon XP CPU, to enable optimizations
> > +       specific to that processor.

> I do believe Athlon XP when you mean MP is a copy/paste typo :)

You are right, thanks for spotting this :)

I'll fix this and re-post it when I have some more feedback.

// Thomas

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations

Post by Thomas Horste » Thu, 08 May 2003 23:10:07


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

 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

 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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2.5.69 Changes to Kconfig and i386 Makefile to include support for various K7 optimizations

[ick, backlog]

 > 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 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.  Additionally, some gcc's got these options wrong.
The athlon4 option was completely wrong for a while for eg.

 > 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

For 2.4, it's an even worse idea IMO.

        Dave

--
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Unix file system

3. 2.5.69 Change to i386 Makefile to distinguish athlons.

4. root remote login question

5. OSDL DBT-2 AS vs. Deadline 2.5.69-mm3 2.5.69-mm2

6. Can't mount CDROM on Sparc20

7. 2.5.69 - Nothing gets installed in /lib/modules/2.5.69/kernel

8. MITSHM: X Error of failed request: ...

9. USB mouse freezes under X - 2.5.69 and 2.5.69-mm*

10. [2.5.69] kexec for 2.5.69 available

11. Problems with IDE CF in 2.5.69, 2.5.69-bk13

12. 2.5.69-bk1[23] kconfig loop