Skip to contentSkip to conversation

arch: x86: change GCC optimisation target from atom to bonnell

RFC PATCH In review Rui Salvaterra 2 participants 3 messages Oct 10, 2016 – Oct 11, 2016 x86

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 arch: x86: change GCC optimisation target from atom to bonnell

Hi, Thomas, Ingo, Peter,

(Sending as RFC, since I don't know if this patch is acceptable.)

The GCC team has deprecated atom as a march/mtune target since almost three years ago, according to this mailing list thread [1], in favour of specific microarchitecture names (bonnell, silvermont). This patch changes the Atom optimisation target in the kernel to bonnell, as it was originally intended.

Tested on an x86-64 Atom 330 machine. No functional changes.

[1] https://gcc.gnu.org/ml/gcc-patches/2013-12/msg01805.html

---
 arch/x86/Makefile        | 4 ++--
 arch/x86/Makefile_32.cpu | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/Makefile +2 -2
index 2d44933..b7d615f 100644
@@ -109,8 +109,8 @@ else
 
         cflags-$(CONFIG_MCORE2) += \
                 $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
-	cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
-		$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
+	cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell) \
+		$(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))
         cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
         KBUILD_CFLAGS += $(cflags-y)
 
arch/x86/Makefile_32.cpu +2 -2
index 6647ed4..d66e5e3 100644
@@ -32,8 +32,8 @@ cflags-$(CONFIG_MCYRIXIII)	+= $(call cc-option,-march=c3,-march=i486) $(align)-f
 cflags-$(CONFIG_MVIAC3_2)	+= $(call cc-option,-march=c3-2,-march=i686)
 cflags-$(CONFIG_MVIAC7)		+= -march=i686
 cflags-$(CONFIG_MCORE2)		+= -march=i686 $(call tune,core2)
-cflags-$(CONFIG_MATOM)		+= $(call cc-option,-march=atom,$(call cc-option,-march=core2,-march=i686)) \
-	$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
+cflags-$(CONFIG_MATOM)		+= $(call cc-option,-march=bonnell,$(call cc-option,-march=core2,-march=i686)) \
+	$(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))
 
 # AMD Elan support
 cflags-$(CONFIG_MELAN)		+= -march=i486
Signature · 1 line
2.10.1
#1 lore raw
Quoted 54 lines · Rui Salvaterra

Hi, Thomas, Ingo, Peter,

(Sending as RFC, since I don't know if this patch is acceptable.)

The GCC team has deprecated atom as a march/mtune target since almost three
years ago, according to this mailing list thread [1], in favour of specific
microarchitecture names (bonnell, silvermont). This patch changes the Atom
optimisation target in the kernel to bonnell, as it was originally intended.

Tested on an x86-64 Atom 330 machine. No functional changes.

[1] https://gcc.gnu.org/ml/gcc-patches/2013-12/msg01805.html

---
arch/x86/Makefile | 4 ++--
arch/x86/Makefile_32.cpu | 4 ++--

2 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/Makefile +2 -2
index 2d44933..b7d615f 100644
@@ -109,8 +109,8 @@ else
 
        cflags-$(CONFIG_MCORE2) += \
       $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
-	cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
-		$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
+	cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell) \
+		$(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))
      cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
        KBUILD_CFLAGS += $(cflags-y)
 
arch/x86/Makefile_32.cpu +0 -0
index 6647ed4..d66e5e3 100644
@@ -32,8 +32,8 @@ cflags-$(CONFIG_MCYRIXIII)	+= $(call

cc-option,-march=c3,-march=i486) $(align)-f
cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
cflags-$(CONFIG_MVIAC7) += -march=i686
cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
-cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom,$(call
cc-option,-march=core2,-march=i686)) \

arch/x86/Makefile_32.cpu +1 -1
-	$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
+cflags-$(CONFIG_MATOM)		+= $(call cc-option,-march=bonnell,$(call

cc-option,-march=core2,-march=i686)) \

arch/x86/Makefile_32.cpu +1 -0
+	$(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))
Quoted 2 lines

# AMD Elan support
cflags-$(CONFIG_MELAN) += -march=i486

This just breaks backwards compatibility with older gcc. If you want to add a comment that's fine, though.

Nacked-by: hpa

Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.
#2 lore raw

2016-10-11 1:11 GMT+01:00 <[email protected]>:

Quoted 55 lines · Rui Salvaterra
Quoted 54 lines

Hi, Thomas, Ingo, Peter,

(Sending as RFC, since I don't know if this patch is acceptable.)

The GCC team has deprecated atom as a march/mtune target since almost three
years ago, according to this mailing list thread [1], in favour of specific
microarchitecture names (bonnell, silvermont). This patch changes the Atom
optimisation target in the kernel to bonnell, as it was originally intended.

Tested on an x86-64 Atom 330 machine. No functional changes.

[1] https://gcc.gnu.org/ml/gcc-patches/2013-12/msg01805.html

---
arch/x86/Makefile | 4 ++--
arch/x86/Makefile_32.cpu | 4 ++--

2 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/Makefile +2 -2
index 2d44933..b7d615f 100644
@@ -109,8 +109,8 @@ else
 
        cflags-$(CONFIG_MCORE2) += \
       $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
-      cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
-              $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
+      cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell) \
+              $(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))
      cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
        KBUILD_CFLAGS += $(cflags-y)
 
arch/x86/Makefile_32.cpu +0 -0
index 6647ed4..d66e5e3 100644
@@ -32,8 +32,8 @@ cflags-$(CONFIG_MCYRIXIII)   += $(call

cc-option,-march=c3,-march=i486) $(align)-f
cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
cflags-$(CONFIG_MVIAC7) += -march=i686
cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
-cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom,$(call
cc-option,-march=core2,-march=i686)) \

arch/x86/Makefile_32.cpu +1 -1
-      $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
+cflags-$(CONFIG_MATOM)                += $(call cc-option,-march=bonnell,$(call

cc-option,-march=core2,-march=i686)) \
+ $(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))

Quoted 8 lines
Quoted 2 lines

# AMD Elan support
cflags-$(CONFIG_MELAN) += -march=i486

This just breaks backwards compatibility with older gcc. If you want to add a comment that's fine, though.

Nacked-by: hpa
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Hi, Hans,

I suspected that (hence the RFC), but I couldn't find the minimum supported gcc version. I was just worried the bonnell microarch could get neglected in the long term, when it needs all the (compiler) help it can get, being in-order.

Thanks,

Rui