mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arch/x86: Makefile: Move CPU-specific tuning for x86_64 to Makefile.cpu
@ 2022-08-17  8:40 torvic9
  0 siblings, 0 replies; only message in thread
From: torvic9 @ 2022-08-17  8:40 UTC (permalink / raw)
  To: tglx, mingo, Borislav Petkov; +Cc: linux-kernel, x86

The Makefile has a 'FIXME', according to which the CPU-specific tuning
options for 64-bit CPUs should be integrated into a separate file.

Move these cflags to a new file named Makefile.cpu in the same way as for
the 32-bit cflags.

There should be no functional change.

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

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 7854685c5f25..c0b4db692544 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -147,12 +147,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)		+= -march=k8
-        cflags-$(CONFIG_MPSC)		+= -march=nocona
-        cflags-$(CONFIG_MCORE2)		+= -march=core2
-        cflags-$(CONFIG_MATOM)		+= -march=atom
-        cflags-$(CONFIG_GENERIC_CPU)	+= -mtune=generic
+        # CPU-specific tuning for x86_64
+        include $(srctree)/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..6995353f87e8
--- /dev/null
+++ b/arch/x86/Makefile.cpu
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
+# CPU tuning section for x86_64
+
+cflags-$(CONFIG_MK8)		+= -march=k8
+cflags-$(CONFIG_MPSC)		+= -march=nocona
+cflags-$(CONFIG_MCORE2)		+= -march=core2
+cflags-$(CONFIG_MATOM)		+= -march=atom
+cflags-$(CONFIG_GENERIC_CPU)	+= -mtune=generic
-- 
2.37.2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-17  8:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-17  8:40 [PATCH] arch/x86: Makefile: Move CPU-specific tuning for x86_64 to Makefile.cpu torvic9

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®