[patch]K6-2/K-III compile option

Anders Fugmann (afu@bording.dk)
Thu, 30 Sep 1999 11:21:55 +0200


This is a multi-part message in MIME format.
--------------9A04E1035063D70AA1DF5A18
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

After seeing that the compile support for the K7 was added, I made this
patch:
This patch adds K6-2/K6-III compile option to "processor types", and
some cleanup.
Also Configure.help has been updated to reflect K6-2/K6-III and K7
support.
Comments are welcome.
The patch is against linux-2.3.18ac10

Anders Fugmann

***Patch begins***

diff -r -u vanilla-2.3.18ac10/Documentation/Configure.help
linux/Documentation/Configure.help
--- vanilla-2.3.18ac10/Documentation/Configure.help Thu Sep 30
10:58:59 1999
+++ linux/Documentation/Configure.help Thu Sep 30 11:04:29 1999
@@ -1849,10 +1849,10 @@
all x86 CPU types (albeit not optimally fast), you can specify
"386" here.

- If you specify one of "486" or "586" or "Pentium" or "PPro", then
- the kernel will not necessarily run on earlier architectures (e.g. a
- Pentium optimized kernel will run on a PPro, but not necessarily on
- a i486).
+ If you specify one of "486" or "586" or "Pentium" or "K6" or "PPro"
or
+ K7, then the kernel will not necessarily run on earlier architectures
+ (e.g. a Pentium optimized kernel will run on a PPro, but not
necessarily
+ on a i486).

Here are the settings recommended for greatest speed:
- "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
@@ -1862,10 +1862,11 @@
AMD/Cyrix 5x86, NexGen Nx586 and UMC U5D or U5S.
- "586" for generic Pentium CPUs, possibly lacking the TSC
(time stamp counter) register.
- - "Pentium" for the Intel Pentium/Pentium MMX, AMD K5, K6 and
- K6-3D.
+ - "Pentium" for the Intel Pentium/Pentium MMX, AMD K5 and K6
+ - "K6-II(I)" for AMD K6-2 or AMD K6-III
- "PPro" for the Cyrix/IBM/National Semiconductor 6x86MX, MII and
Intel Pentium II/Pentium Pro.
+ - "K7" for the AMD Athlon processor.

If you don't know what to do, choose "386".

diff -r -u vanilla-2.3.18ac10/arch/i386/Makefile
linux/arch/i386/Makefile
--- vanilla-2.3.18ac10/arch/i386/Makefile Thu Sep 30 10:58:59 1999
+++ linux/arch/i386/Makefile Wed Sep 29 19:07:24 1999
@@ -52,6 +52,12 @@
AFLAGS := $(AFLAGS) -DCPU=586
endif

+ifdef CONFIG_M586TSC
+CFLAGS := $(CFLAGS) -DCPU=586
+CFLAGS += $(shell if $(CC) -march=k6 -S -o /dev/null -xc /dev/null
>/dev/null 2>&1; then echo "-march=k6"; fi)
+AFLAGS := $(AFLAGS) -DCPU=586
+endif
+
ifdef CONFIG_M686
CFLAGS := $(CFLAGS) -DCPU=686
CFLAGS += $(shell if $(CC) -march=i686 -S -o /dev/null -xc /dev/null
>/dev/null 2>&1; then echo "-march=i686"; fi)
@@ -59,7 +65,7 @@
endif

ifdef CONFIG_MK7
-CFLAGS := $(CFLAGS) -DCPU=686 -march=pentiumpro -mpentiumpro
-malign-functions=4 -fschedule-insns2 -mwide-multiply
-fexpensive-optimizations
+CFLAGS := $(CFLAGS) -DCPU=686 -malign-functions=4 -fschedule-insns2
-mwide-multiply -fexpensive-optimizations
CFLAGS += $(shell if $(CC) -march=i686 -S -o /dev/null -xc /dev/null
>/dev/null 2>&1; then echo "-march=i686"; fi)
AFLAGS := $(AFLAGS) -DCPU=686
endif
diff -r -u vanilla-2.3.18ac10/arch/i386/config.in
linux/arch/i386/config.in
--- vanilla-2.3.18ac10/arch/i386/config.in Thu Sep 30 10:58:59 1999
+++ linux/arch/i386/config.in Wed Sep 29 19:45:40 1999
@@ -18,8 +18,9 @@
"386 CONFIG_M386 \
486/Cx486 CONFIG_M486 \
586/K5/5x86/6x86 CONFIG_M586 \
- Pentium/K6/TSC CONFIG_M586TSC \
- PPro/6x86MX CONFIG_M686 \
+ Pentium/TSC/K6 CONFIG_M586TSC \
+ K6-2/K6-III CONFIG_MK6 \
+ PPro/6x86MX CONFIG_M686 \
Athlon CONFIG_MK7" PPro
#
# Define implied options from the CPU selection here
@@ -30,15 +31,14 @@
define_bool CONFIG_X86_BSWAP y
define_bool CONFIG_X86_POPAD_OK y
fi
-if [ "$CONFIG_M686" = "y" -o "$CONFIG_M586TSC" = "y" ]; then
+if [ "$CONFIG_M686" = "y" -o "$CONFIG_M586TSC" = "y" -o \
+ "$CONFIG_MK6" = "y" -o "$CONFIG_MK7" = "y" ]; then
define_bool CONFIG_X86_TSC y
fi
-if [ "$CONFIG_M686" = "y" ]; then
+if [ "$CONFIG_M686" = "y" -o "$CONFIG_MK7" = "y" ]; then
define_bool CONFIG_X86_GOOD_APIC y
fi
-if [ "$CONFIG_MK7" = "y" ]; then
- define_bool CONFIG_X86_TSC y
- define_bool CONFIG_X86_GOOD_APIC y
+if [ "$CONFIG_MK6" = "y" -o "$CONFIG_MK7" = "y" ]; then
define_bool CONFIG_X86_USE_3DNOW y
fi

diff -r -u vanilla-2.3.18ac10/arch/i386/defconfig
linux/arch/i386/defconfig
--- vanilla-2.3.18ac10/arch/i386/defconfig Thu Sep 30 10:58:59 1999
+++ linux/arch/i386/defconfig Wed Sep 29 19:33:18 1999
@@ -16,6 +16,7 @@
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
+# CONFIG_MK6 is not set
CONFIG_M686=y
# CONFIG_MK7 is not set
CONFIG_X86_WP_WORKS_OK=y

***Patch ends***
--------------9A04E1035063D70AA1DF5A18
Content-Type: application/octet-stream;
name="k6-2.3.18ac10.diff.bz2"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="k6-2.3.18ac10.diff.bz2"

QlpoOTFBWSZTWXSuyrAABVTfgHAyXe//+3/v3s6/79/wYAbF987dX3u0rod2BJ0AAA00kyRl
MyEaZDE0Yg0MRpkBkMRhPSPUDJJMJvSaBI3pQyaNA00AA0AGgAAcAwjCaYhgEAyAGEaZMmEY
CGgkRUmCGgAAaNDQAAPUGgNNAACKSmhNDRp6jIDTIAGhiGgAAAACREQJiGpk9JpqmjTZU8p6
T0ZAaI0eowaE9PSmjkCVWkWsQutSiN0FXw+UGr205mMVjQ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vvNH34IINFD2jJ+JGRUaTrGXGSq4hL40AdoqoYxi8JMFuE
lFWQrukB2pVBXgN4B4AXNO4U3d7JC4Bjgr5KVwBgF7hisGp/GF15iVc21PmBNYPG6kFgZKpN
VdmYbgrTgftBgEqE2i0i1Wh7S5jcIKB9YUItNqxy6hRWCjgfClD2HWTyGFqWBEBC+DBG8Yzb
eK53C3CTlA02Er/KA4Cq2ThQnSQC5UMj/XaUDvSUFwGhiX/y8tA3XPyIt3C0QW+TxGIfCNQG
qgXrXCQlekYSlcCoChBQKJU9pAUrBFIDJIPdmIgzVwSkWlCGHqRil5AVT9Qu07Nh41wC1dNG
23BIZLECwYFobwMA2iu3BYBrTEvAhCsR04dhRAbzYG8NDyheG97BYNckoVZSgGgpOoeUr27C
pYBVBVWBRgPPOgVK3F/xSqJbGBvJaT2yF0hXZZNSAgqKriIaGnFAitI3jRQoFETVjSyDMKRQ
FQqBIjSi0GWFgw7QvhAc0FAMMUaKCA0hHYw8YZmKU8Z4NGEWwilBgfUEo4pY1xGkY8oGlplr
zEe4Mo2rqA7IuDzk9t0bzKB4iW0GGA0m3zQhjfIO2wgmgXgyA8m8YD0tDeVTyRh9MhvC0yuS
8ypUHIXhVmM4Sj+ahtKQK21lwUGiJuQj157GGutiUwal6AtupmyOSMg4h2q5BqbklcDOgcC7
rDedpeBmgzAvItnYMKcRpi6d/qr9hCv0TKbfFAn1ikZ6wVA37AyD/4u5IpwoSDpXZVgA
--------------9A04E1035063D70AA1DF5A18--

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