Skip to content

Commit 1ca3683

Browse files
ubizjakIngo Molnar
authored andcommitted
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: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo 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
1 parent 8ae292c commit 1ca3683

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/x86/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,6 +2388,13 @@ source "kernel/livepatch/Kconfig"
23882388

23892389
endmenu
23902390

2391+
config CC_HAS_NAMED_AS
2392+
def_bool CC_IS_GCC && GCC_VERSION >= 120100
2393+
2394+
config USE_X86_SEG_SUPPORT
2395+
def_bool y
2396+
depends on CC_HAS_NAMED_AS && SMP
2397+
23912398
config CC_HAS_SLS
23922399
def_bool $(cc-option,-mharden-sls=all)
23932400

0 commit comments

Comments
 (0)