All of lore.kernel.org
 help / color / mirror / Atom feed
* [0/3] three i386 patches
@ 2004-01-12 23:08 Adrian Bunk
  2004-01-12 23:10 ` [1/3] gcc 2.95 supports -march=k6 (no need for check_gcc) Adrian Bunk
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-01-12 23:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Hi Andrew,

following this mail, I'll send the following three patches that have 
accumulated in my better i386 CPU selection patch (but don't depend on 
it):

[1/3] gcc 2.95 supports -march=k6 (no need for check_gcc)
[2/3] added Pentium M and Pentium-4 M options
[3/3] AMD Elan is a different subarch

Please apply
Adrian

-- 

       "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


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

* [1/3] gcc 2.95 supports -march=k6 (no need for check_gcc)
  2004-01-12 23:08 [0/3] three i386 patches Adrian Bunk
@ 2004-01-12 23:10 ` Adrian Bunk
  2004-01-12 23:26 ` [2/3] add Pentium M and Pentium-4 M options Adrian Bunk
  2004-01-12 23:37 ` [3/3] AMD Elan is a different subarch Adrian Bunk
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-01-12 23:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

gcc 2.95 supports -march=k6 (no need for check_gcc)

--- linux-2.6.1-mm2/arch/i386/Makefile.old	2004-01-12 23:44:38.000000000 +0100
+++ linux-2.6.1-mm2/arch/i386/Makefile	2004-01-12 23:45:44.000000000 +0100
@@ -35,7 +35,7 @@
 cflags-$(CONFIG_MPENTIUMII)	+= $(call check_gcc,-march=pentium2,-march=i686)
 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)		+= -march=k6
 # Please note, that patches that add -march=athlon-xp and friends are pointless.
 # They make zero difference whatsosever to performance at this time.
 cflags-$(CONFIG_MK7)		+= $(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4)


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

* [2/3] add Pentium M and Pentium-4 M options
  2004-01-12 23:08 [0/3] three i386 patches Adrian Bunk
  2004-01-12 23:10 ` [1/3] gcc 2.95 supports -march=k6 (no need for check_gcc) Adrian Bunk
@ 2004-01-12 23:26 ` Adrian Bunk
  2004-01-12 23:37 ` [3/3] AMD Elan is a different subarch Adrian Bunk
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-01-12 23:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

add Pentium M and Pentium-4 M options:
- add MPENTIUMM (equivalent to PENTIUMIII except for a bigger
  X86_L1_CACHE_SHIFT)
- document that MPENTIUM4 is the right choice for a Pentium-4 M


diffstat output:

 arch/i386/Kconfig         |   28 +++++++++++++++++-----------
 arch/i386/Makefile        |    1 +
 include/asm-i386/module.h |    4 +++-
 3 files changed, 21 insertions(+), 12 deletions(-)


--- linux-2.6.1/include/asm-i386/module.h.old	2004-01-10 15:12:39.000000000 +0100
+++ linux-2.6.1/include/asm-i386/module.h	2004-01-10 15:24:14.000000000 +0100
@@ -26,6 +26,8 @@
 #define MODULE_PROC_FAMILY "PENTIUMII "
 #elif defined CONFIG_MPENTIUMIII
 #define MODULE_PROC_FAMILY "PENTIUMIII "
+#elif defined CONFIG_MPENTIUMM
+#define MODULE_PROC_FAMILY "PENTIUMM "
 #elif defined CONFIG_MPENTIUM4
 #define MODULE_PROC_FAMILY "PENTIUM4 "
 #elif defined CONFIG_MK6
@@ -49,7 +51,7 @@
 #elif CONFIG_MVIAC3_2
 #define MODULE_PROC_FAMILY "VIAC3-2 "
 #else
-#error unknown processor family
+#define MODULE_PROC_FAMILY "this needs to be fixed"
 #endif
 
 #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY
--- linux-2.6.1-mm2/arch/i386/Kconfig.old	2004-01-13 00:21:54.000000000 +0100
+++ linux-2.6.1-mm2/arch/i386/Kconfig	2004-01-13 00:23:53.000000000 +0100
@@ -222,14 +222,20 @@
 	  extended prefetch instructions in addition to the Pentium II
 	  extensions.
 
+config MPENTIUMM
+	bool "Pentium M"
+	help
+	  Select this for Intel Pentium M (not Pentium-4 M)
+	  notebook chips.
+
 config MPENTIUM4
-	bool "Pentium-4/Celeron(P4-based)/Xeon"
+	bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon"
 	help
-	  Select this for Intel Pentium 4 chips.  This includes both
-	  the Pentium 4 and P4-based Celeron chips.  This option
-	  enables compile flags optimized for the chip, uses the
-	  correct cache shift, and applies any applicable Pentium III
-	  optimizations.
+	  Select this for Intel Pentium 4 chips.  This includes the
+	  Pentium 4, P4-based Celeron and Xeon, and Pentium-4 M
+	  (not Pentium M) chips.  This option enables compile flags
+	  optimized for the chip, uses the correct cache shift, and
+	  applies any applicable Pentium III optimizations.
 
 config MK6
 	bool "K6/K6-II/K6-III"
@@ -329,7 +335,7 @@
 	int
 	default "7" if MPENTIUM4 || X86_GENERIC
 	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 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2
 	default "6" if MK7 || MK8
 
 config RWSEM_GENERIC_SPINLOCK
@@ -379,17 +385,17 @@
 
 config X86_GOOD_APIC
 	bool
-	depends on MK7 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8
+	depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8
 	default y
 
 config X86_INTEL_USERCOPY
 	bool
-	depends on MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7
+	depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7
 	default y
 
 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 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2
 	default y
 
 config X86_USE_3DNOW
@@ -561,7 +567,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 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2) && !X86_NUMAQ
 	default y
 
 config X86_MCE
--- linux-2.6.1-mm2/arch/i386/Makefile.old	2004-01-13 00:21:45.000000000 +0100
+++ linux-2.6.1-mm2/arch/i386/Makefile	2004-01-13 00:21:58.000000000 +0100
@@ -34,6 +34,7 @@
 cflags-$(CONFIG_M686)		+= -march=i686
 cflags-$(CONFIG_MPENTIUMII)	+= $(call check_gcc,-march=pentium2,-march=i686)
 cflags-$(CONFIG_MPENTIUMIII)	+= $(call check_gcc,-march=pentium3,-march=i686)
+cflags-$(CONFIG_MPENTIUMM)	+= $(call check_gcc,-march=pentium3,-march=i686)
 cflags-$(CONFIG_MPENTIUM4)	+= $(call check_gcc,-march=pentium4,-march=i686)
 cflags-$(CONFIG_MK6)		+= -march=k6
 # Please note, that patches that add -march=athlon-xp and friends are pointless.

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

* [3/3] AMD Elan is a different subarch
  2004-01-12 23:08 [0/3] three i386 patches Adrian Bunk
  2004-01-12 23:10 ` [1/3] gcc 2.95 supports -march=k6 (no need for check_gcc) Adrian Bunk
  2004-01-12 23:26 ` [2/3] add Pentium M and Pentium-4 M options Adrian Bunk
@ 2004-01-12 23:37 ` Adrian Bunk
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-01-12 23:37 UTC (permalink / raw)
  To: Andrew Morton, robert; +Cc: linux-kernel

- AMD Elan is a different subarch, you can't configure a kernel that
  runs on both the AMD Elan and other i386 CPUs
- added optimizing CFLAGS for the AMD Elan


diffstat output:

 arch/i386/Kconfig                    |   17 +++++++++++++++--
 arch/i386/Makefile                   |    3 +++
 arch/i386/boot/setup.S               |    2 +-
 arch/i386/kernel/cpu/cpufreq/Kconfig |    2 +-
 include/asm-i386/timex.h             |    2 +-
 5 files changed, 21 insertions(+), 5 deletions(-)



--- linux-2.6.0-test5-mm4/arch/i386/boot/setup.S.old	2003-09-25 14:28:07.000000000 +0200
+++ linux-2.6.0-test5-mm4/arch/i386/boot/setup.S	2003-09-25 14:28:16.000000000 +0200
@@ -755,7 +755,7 @@
 # AMD Elan bug fix by Robert Schwebel.
 #
 
-#if defined(CONFIG_MELAN)
+#if defined(CONFIG_X86_ELAN)
 	movb $0x02, %al			# alternate A20 gate
 	outb %al, $0x92			# this works on SC410/SC520
 a20_elan_wait:
--- linux-2.6.0-test5-mm4/include/asm-i386/timex.h.old	2003-09-25 14:28:07.000000000 +0200
+++ linux-2.6.0-test5-mm4/include/asm-i386/timex.h	2003-09-25 14:28:16.000000000 +0200
@@ -12,7 +12,7 @@
 #ifdef CONFIG_X86_PC9800
    extern int CLOCK_TICK_RATE;
 #else
-#ifdef CONFIG_MELAN
+#ifdef CONFIG_X86_ELAN
 #  define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */
 #else
 #  define CLOCK_TICK_RATE 1193182 /* Underlying HZ */
--- linux-2.6.1-rc1/arch/i386/kernel/cpu/cpufreq/Kconfig.old	2004-01-08 04:04:37.000000000 +0100
+++ linux-2.6.1-rc1/arch/i386/kernel/cpu/cpufreq/Kconfig	2004-01-08 04:05:26.000000000 +0100
@@ -54,7 +54,7 @@
 
 config ELAN_CPUFREQ
 	tristate "AMD Elan"
-	depends on CPU_FREQ_TABLE && MELAN
+	depends on CPU_FREQ_TABLE && X86_ELAN
 	---help---
 	  This adds the CPUFreq driver for AMD Elan SC400 and SC410
 	  processors.
--- linux-2.6.1-mm2/arch/i386/Kconfig.old	2004-01-12 23:55:45.000000000 +0100
+++ linux-2.6.1-mm2/arch/i386/Kconfig	2004-01-12 23:57:45.000000000 +0100
@@ -43,6 +43,15 @@
 	help
 	  Choose this option if your computer is a standard PC or compatible.
 
+config X86_ELAN
+	bool "AMD Elan"
+	help
+	  Select this for an AMD Elan processor.
+	  
+	  Do not use this option for K6/Athlon/Opteron processors!
+	  
+	  If unsure, choose "PC-compatible" instead.
+
 config X86_VOYAGER
 	bool "Voyager (NCR)"
 	help
@@ -130,6 +139,8 @@
 	default y
 	depends on SMP && X86_ES7000 && MPENTIUMIII
 
+if !X86_ELAN
+
 choice
 	prompt "Processor family"
 	default M686
@@ -319,6 +330,8 @@
 	  when it has moderate overhead. This is intended for generic 
 	  distributions kernels.
 
+endif
+
 #
 # Define implied options from the CPU selection here
 #
@@ -335,7 +348,7 @@
 config X86_L1_CACHE_SHIFT
 	int
 	default "7" if MPENTIUM4 || X86_GENERIC
-	default "4" if MELAN || M486 || M386
+	default "4" if X86_ELAN || M486 || M386
 	default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MCYRIXIII || MK6 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2
 	default "6" if MK7 || MK8
 
@@ -381,7 +394,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 || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2
 	default y
 
 config X86_GOOD_APIC
--- linux-2.6.1-mm2/arch/i386/Makefile.old	2004-01-13 00:33:12.000000000 +0100
+++ linux-2.6.1-mm2/arch/i386/Makefile	2004-01-13 00:34:48.000000000 +0100
@@ -48,6 +48,9 @@
 cflags-$(CONFIG_MCYRIXIII)	+= $(call check_gcc,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
 cflags-$(CONFIG_MVIAC3_2)	+= $(call check_gcc,-march=c3-2,-march=i686)
 
+# AMD Elan support
+cflags-$(CONFIG_X86_ELAN)	+= -march=i486
+
 CFLAGS += $(cflags-y)
 
 # Default subarch .c files

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

end of thread, other threads:[~2004-01-12 23:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-12 23:08 [0/3] three i386 patches Adrian Bunk
2004-01-12 23:10 ` [1/3] gcc 2.95 supports -march=k6 (no need for check_gcc) Adrian Bunk
2004-01-12 23:26 ` [2/3] add Pentium M and Pentium-4 M options Adrian Bunk
2004-01-12 23:37 ` [3/3] AMD Elan is a different subarch Adrian Bunk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.