* [PATCH] AMD Geode LX optimizations @ 2009-10-01 15:11 Matteo Croce 2009-10-02 18:27 ` [tip:x86/cpu] x86: " tip-bot for Matteo Croce 0 siblings, 1 reply; 3+ messages in thread From: Matteo Croce @ 2009-10-01 15:11 UTC (permalink / raw) To: H. Peter Anvin; +Cc: linux-kernel 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 <technoboy85@gmail.com> --- 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:x86/cpu] x86: AMD Geode LX optimizations 2009-10-01 15:11 [PATCH] AMD Geode LX optimizations Matteo Croce @ 2009-10-02 18:27 ` tip-bot for Matteo Croce 2010-03-01 22:18 ` Matteo Croce 0 siblings, 1 reply; 3+ messages in thread From: tip-bot for Matteo Croce @ 2009-10-02 18:27 UTC (permalink / raw) To: linux-tip-commits; +Cc: linux-kernel, technoboy85, hpa, mingo, tglx Commit-ID: 98059e3463383b18fd79181179cd539b74846b47 Gitweb: http://git.kernel.org/tip/98059e3463383b18fd79181179cd539b74846b47 Author: Matteo Croce <technoboy85@gmail.com> AuthorDate: Thu, 1 Oct 2009 17:11:10 +0200 Committer: H. Peter Anvin <hpa@zytor.com> 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 <technoboy85@gmail.com> LKML-Reference: <40101cc30910010811v5d15ff4cx9dd57c9cc9b4b045@mail.gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com> --- 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)) ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tip:x86/cpu] x86: AMD Geode LX optimizations 2009-10-02 18:27 ` [tip:x86/cpu] x86: " tip-bot for Matteo Croce @ 2010-03-01 22:18 ` Matteo Croce 0 siblings, 0 replies; 3+ messages in thread From: Matteo Croce @ 2010-03-01 22:18 UTC (permalink / raw) To: linux-tip-commits; +Cc: linux-kernel, technoboy85, hpa, mingo, tglx On Fri, Oct 2, 2009 at 7:27 PM, tip-bot for Matteo Croce <technoboy85@gmail.com> wrote: > Commit-ID: 98059e3463383b18fd79181179cd539b74846b47 > Gitweb: http://git.kernel.org/tip/98059e3463383b18fd79181179cd539b74846b47 > Author: Matteo Croce <technoboy85@gmail.com> > AuthorDate: Thu, 1 Oct 2009 17:11:10 +0200 > Committer: H. Peter Anvin <hpa@zytor.com> > 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 <technoboy85@gmail.com> > LKML-Reference: <40101cc30910010811v5d15ff4cx9dd57c9cc9b4b045@mail.gmail.com> > Signed-off-by: H. Peter Anvin <hpa@zytor.com> > > > --- > 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)) > Unfortunately it seems that GCC produces slower code with -march=geode and that the fastest code is generated with -march=i686: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41989 We have two possible solutions: revert the flags or wait for the GCC folks to fix the compiler. In the meantime I discovered that even the older Geode GX does have CMOV and MMX so have a look at this new patch Signed-off-by: Matteo Croce <technoboy85@gmail.com> --- a/arch/x86/Kconfig.cpu 2010-03-01 00:45:39.484611338 +0100 +++ b/arch/x86/Kconfig.cpu 2010-03-01 00:46:08.776560999 +0100 @@ -402,7 +402,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 || MATOM || MGEODE_LX) + depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODEGX1 || MGEODE_LX) config X86_MINIMUM_CPU_FAMILY int --- a/arch/x86/Makefile_32.cpu 2010-03-01 00:44:07.948526792 +0100 +++ b/arch/x86/Makefile_32.cpu 2010-03-01 23:15:48.503698008 +0100 @@ -40,7 +40,7 @@ cflags-$(CONFIG_X86_ELAN) += -march=i486 # Geode GX1 support -cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx +cflags-$(CONFIG_MGEODEGX1) += $(call cc-option,-march=geode,-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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-01 22:19 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-10-01 15:11 [PATCH] AMD Geode LX optimizations Matteo Croce 2009-10-02 18:27 ` [tip:x86/cpu] x86: " tip-bot for Matteo Croce 2010-03-01 22:18 ` Matteo Croce
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®