2009-10-01 15:11:30

by Matteo Croce

[permalink] [raw]
Subject: [PATCH] AMD Geode LX optimizations

Hi,
i found that we can optimize a bit the kernel for the AMD Geode LX.
I made this simple patch against a 2.6.31 kernel.
Tested, compiles and works fine.

Signed-off-by: Matteo Croce <[email protected]>

--- a/arch/x86/Makefile_32.cpu 2009-09-10 21:16:53.198243207 +0200
+++ b/arch/x86/Makefile_32.cpu 2009-09-10 21:21:28.434245121 +0200
@@ -39,7 +39,7 @@

# Geode GX1 support
cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx
-
+cflags-$(CONFIG_MGEODE_LX) += $(call cc-option,-march=geode,-march=pentium-mmx)
# add at the end to overwrite eventual tuning options from earlier
# cpu entries
cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686))
--- a/arch/x86/Kconfig.cpu 2009-10-01 16:51:56.567771217 +0200
+++ b/arch/x86/Kconfig.cpu 2009-10-01 16:52:25.936010648 +0200
@@ -397,7 +397,7 @@
# generates cmov.
config X86_CMOV
def_bool y
- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM ||
MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE ||
MEFFICEON || X86_64)
+ depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM ||
MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE ||
MEFFICEON || MGEODE_LX || X86_64)

config X86_MINIMUM_CPU_FAMILY
int


2009-10-02 18:28:18

by Matteo Croce

[permalink] [raw]
Subject: [tip:x86/cpu] x86: AMD Geode LX optimizations

Commit-ID: 98059e3463383b18fd79181179cd539b74846b47
Gitweb: http://git.kernel.org/tip/98059e3463383b18fd79181179cd539b74846b47
Author: Matteo Croce <[email protected]>
AuthorDate: Thu, 1 Oct 2009 17:11:10 +0200
Committer: H. Peter Anvin <[email protected]>
CommitDate: Fri, 2 Oct 2009 11:24:28 -0700

x86: AMD Geode LX optimizations

Add CPU optimizations for AMD Geode LX.

Signed-off-by: Matteo Croce <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>


---
arch/x86/Kconfig.cpu | 2 +-
arch/x86/Makefile_32.cpu | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 527519b..979de29 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -406,7 +406,7 @@ config X86_CMPXCHG64
# generates cmov.
config X86_CMOV
def_bool y
- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM)
+ depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)

config X86_MINIMUM_CPU_FAMILY
int
diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu
index 30e9a26..cbf0776 100644
--- a/arch/x86/Makefile_32.cpu
+++ b/arch/x86/Makefile_32.cpu
@@ -41,7 +41,7 @@ cflags-$(CONFIG_X86_ELAN) += -march=i486

# Geode GX1 support
cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx
-
+cflags-$(CONFIG_MGEODE_LX) += $(call cc-option,-march=geode,-march=pentium-mmx)
# add at the end to overwrite eventual tuning options from earlier
# cpu entries
cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686))