[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251222-cc-can-link-x86-v1-1-b7c11d77a8d1@linutronix.de>
Date: Mon, 22 Dec 2025 09:29:42 +0100
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>
Cc: linux-kernel@...r.kernel.org,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH] x86/Kconfig: Implement ARCH_HAS_CC_CAN_LINK
The generic CC_CAN_LINK detection does not work for all architectures.
Make the logic easier to understand and allow the simplification of the
generic CC_CAN_LINK by using a tailored implementation.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
---
arch/x86/Kconfig | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 80527299f859..2a43e42e63fd 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -73,6 +73,7 @@ config X86
select ARCH_ENABLE_SPLIT_PMD_PTLOCK if (PGTABLE_LEVELS > 2) && (X86_64 || X86_PAE)
select ARCH_ENABLE_THP_MIGRATION if X86_64 && TRANSPARENT_HUGEPAGE
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
+ select ARCH_HAS_CC_CAN_LINK
select ARCH_HAS_CPU_ATTACK_VECTORS if CPU_MITIGATIONS
select ARCH_HAS_CACHE_LINE_SIZE
select ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
@@ -3175,6 +3176,16 @@ config HAVE_ATOMIC_IOMAP
def_bool y
depends on X86_32
+config ARCH_CC_CAN_LINK
+ bool
+ default $(cc_can_link_user,-m64) if 64BIT
+ default $(cc_can_link_user,-m32)
+
+config ARCH_USERFLAGS
+ string
+ default "-m64" if 64BIT
+ default "-m32"
+
source "arch/x86/kvm/Kconfig"
source "arch/x86/Kconfig.cpufeatures"
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251222-cc-can-link-x86-fa7a15eec4db
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Powered by blists - more mailing lists