diff options
| author | Uros Bizjak <[email protected]> | 2023-10-04 16:49:42 +0200 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2023-10-05 09:01:52 +0200 |
| commit | 1ca3683cc6d2c2ce4204df519c4e4730d037905a (patch) | |
| tree | 130f3f1453734365678b775f602b5751a5973bde | |
| parent | 8ae292c66dcb160b3e1e16b66c3076d5a2c63873 (diff) | |
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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
| -rw-r--r-- | arch/x86/Kconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 982b777eadc7..ecb256954351 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -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) |