Commit 1ca3683c authored by Uros Bizjak's avatar Uros Bizjak Committed by Ingo Molnar
Browse files

x86/percpu: Enable named address spaces with known compiler version



Enable named address spaces with known compiler versions
(GCC 12.1 and later) in order to avoid possible issues with named
address spaces with older compilers. Set CC_HAS_NAMED_AS when the
compiler satisfies version requirements and set USE_X86_SEG_SUPPORT
to signal when segment qualifiers could be used.

Signed-off-by: default avatarUros Bizjak <ubizjak@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20231004145137.86537-3-ubizjak@gmail.com
parent 8ae292c6
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2388,6 +2388,13 @@ source "kernel/livepatch/Kconfig"

endmenu

config CC_HAS_NAMED_AS
	def_bool CC_IS_GCC && GCC_VERSION >= 120100

config USE_X86_SEG_SUPPORT
	def_bool y
	depends on CC_HAS_NAMED_AS && SMP

config CC_HAS_SLS
	def_bool $(cc-option,-mharden-sls=all)