Re: [PATCH] Support for GEODE CPUs
From: Kianusch Sayah Karadji
Date: Mon Mar 21 2005 - 20:31:50 EST
Hi!
On Mon, 21 Mar 2005, Andrew Morton wrote:
Either revert it or make it Geode GX and correct the options set. I've
no problem with a Geode option that sets the right options 8)
Two weeks, no patch. It looks like we'll be reverting it.
I somehow missed the thread in the list discussing the neccesary changes.
Anyway here's a new patch (this time for 2.6.11).
I changed the whole thing from "Geode GX" to "Geode GX1", and made the
adjustments Alan suggested.
Regards
Kianusch
BTW.: I wish everybody - celebrating "new year" (NowRouz) these days - a
happy and peaceful new year - and everybody else a wonderful spring
quinox.diff -Nur linux-2.6.11/arch/i386/Kconfig linux-2.6.11_geode/arch/i386/Kconfig
--- linux-2.6.11/arch/i386/Kconfig Wed Mar 2 08:37:49 2005
+++ linux-2.6.11_geode/arch/i386/Kconfig Tue Mar 22 02:03:17 2005
@@ -183,6 +183,7 @@
- "Winchip-C6" for original IDT Winchip.
- "Winchip-2" for IDT Winchip 2.
- "Winchip-2A" for IDT Winchips with 3dNow! capabilities.
+ - "GeodeGX1" for Geode GX1 (Cyrix MediaGX).
- "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
- "VIA C3-2 for VIA C3-2 "Nehemiah" (model 9 and above).
@@ -310,6 +311,11 @@
stores for this CPU, which can increase performance of some
operations.
+config MGEODEGX1
+ bool "GeodeGX1"
+ help
+ Select this for a Geode GX1 (Cyrix MediaGX) chip.
+
config MCYRIXIII
bool "CyrixIII/VIA-C3"
help
@@ -360,7 +366,7 @@
int
default "7" if MPENTIUM4 || X86_GENERIC
default "4" if X86_ELAN || M486 || M386
- default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2
+ default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODEGX1
default "6" if MK7 || MK8 || MPENTIUMM
config RWSEM_GENERIC_SPINLOCK
@@ -379,7 +385,7 @@
config X86_PPRO_FENCE
bool
- depends on M686 || M586MMX || M586TSC || M586 || M486 || M386
+ depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1
default y
config X86_F00F_BUG
@@ -409,7 +415,7 @@
config X86_ALIGNMENT_16
bool
- depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2
+ depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
default y
config X86_GOOD_APIC
@@ -570,7 +576,7 @@
config X86_TSC
bool
- depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2) && !X86_NUMAQ
+ depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1) && !X86_NUMAQ
default y
config X86_MCE
diff -Nur linux-2.6.11/arch/i386/Makefile linux-2.6.11_geode/arch/i386/Makefile
--- linux-2.6.11/arch/i386/Makefile Wed Mar 2 08:37:58 2005
+++ linux-2.6.11_geode/arch/i386/Makefile Tue Mar 22 02:04:27 2005
@@ -14,6 +14,8 @@
# 19990713 Artur Skawina <skawina@xxxxxxxxxxxxx>
# Added '-march' and '-mpreferred-stack-boundary' support
#
+# 20050320 Kianusch Sayah Karadji <kianusch@xxxxxxxxxxx>
+# Added support for GEODE CPU
LDFLAGS := -m elf_i386
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
@@ -51,6 +53,9 @@
# AMD Elan support
cflags-$(CONFIG_X86_ELAN) += -march=i486
+
+# Geode GX1 support
+cflags-$(CONFIG_MGEODEGX1) += $(call cc-option,-march=pentium-mmx,-march=i486)
# -mregparm=3 works ok on gcc-3.0 and later
#
diff -Nur linux-2.6.11/include/asm-i386/module.h linux-2.6.11_geode/include/asm-i386/module.h
--- linux-2.6.11/include/asm-i386/module.h Wed Mar 2 08:37:48 2005
+++ linux-2.6.11_geode/include/asm-i386/module.h Tue Mar 22 02:03:17 2005
@@ -52,6 +52,8 @@
#define MODULE_PROC_FAMILY "CYRIXIII "
#elif defined CONFIG_MVIAC3_2
#define MODULE_PROC_FAMILY "VIAC3-2 "
+#elif CONFIG_MGEODEGX1
+#define MODULE_PROC_FAMILY "GEODEGX1 "
#else
#error unknown processor family
#endif