linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] x86, Makefile: Move the CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu
@ 2021-08-17 14:23 torvic9
  2021-08-17 14:24 ` [PATCH 2/2] x86, Makefile: Add new generic x86-64 settings v2/v3/v4 torvic9
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: torvic9 @ 2021-08-17 14:23 UTC (permalink / raw)
  To: linux-kernel, x86; +Cc: clang-built-linux

In accordance with the FIXME comment in arch/x86/Makefile, move the
CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu.

Signed-off-by: Tor Vic <torvic9@mailbox.org>
---
 arch/x86/Makefile     | 11 ++---------
 arch/x86/Makefile.cpu | 12 ++++++++++++
 2 files changed, 14 insertions(+), 9 deletions(-)
 create mode 100644 arch/x86/Makefile.cpu

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 307fd0000a83..94105d7ad22c 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -119,15 +119,8 @@ else
 	# Use -mskip-rax-setup if supported.
 	KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
 
-        # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
-        cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
-        cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
-
-        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_GENERIC_CPU) += $(call cc-option,-mtune=generic)
+        # CPU-specific tuning (64-bit).
+        include arch/x86/Makefile.cpu
         KBUILD_CFLAGS += $(cflags-y)
 
         KBUILD_CFLAGS += -mno-red-zone
diff --git a/arch/x86/Makefile.cpu b/arch/x86/Makefile.cpu
new file mode 100644
index 000000000000..fb407ae94d90
--- /dev/null
+++ b/arch/x86/Makefile.cpu
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0
+# CPU tuning section (64-bit) - shared with UML.
+# Must change only cflags-y (or [yn]), not CFLAGS! That makes a difference for UML.
+
+cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
+cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
+
+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_GENERIC_CPU) += $(call cc-option,-mtune=generic)
-- 
2.32.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-08-19 21:58 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 14:23 [PATCH 1/2] x86, Makefile: Move the CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu torvic9
2021-08-17 14:24 ` [PATCH 2/2] x86, Makefile: Add new generic x86-64 settings v2/v3/v4 torvic9
2021-08-17 18:17   ` Nick Desaulniers
2021-08-17 18:22     ` Nick Desaulniers
2021-08-17 18:31       ` Tor Vic
2021-08-17 18:47         ` Nick Desaulniers
2021-08-17 18:36   ` Borislav Petkov
2021-08-17 19:12     ` Tor Vic
2021-08-18 15:08     ` torvic9
2021-08-18 17:59       ` Borislav Petkov
2021-08-18 18:28         ` Tor Vic
2021-08-18 18:43           ` Borislav Petkov
2021-08-18  7:15   ` Christoph Hellwig
2021-08-18  9:46     ` torvic9
2021-08-19 21:58     ` David Laight
2021-08-17 17:58 ` [PATCH 1/2] x86, Makefile: Move the CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu Nick Desaulniers
2021-08-17 18:28   ` Tor Vic
2021-08-18  7:11 ` Christoph Hellwig
2021-08-18  9:46   ` torvic9
2021-08-18 14:51 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).