Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove Intel compiler support

include/linux/compiler-intel.h had no update in the past 3 years.

We often forget about the third C compiler to build the kernel.

For example, commit a0a12c3ed057 ("asm goto: eradicate CC_HAS_ASM_GOTO")
only mentioned GCC and Clang.

init/Kconfig defines CC_IS_GCC and CC_IS_CLANG but not CC_IS_ICC,
and nobody has reported any issue.

I guess the Intel Compiler support is broken, and nobody is caring
about it.

Harald Arnesen pointed out ICC (classic Intel C/C++ compiler) is
deprecated:

$ icc -v
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is
deprecated and will be removed from product release in the second half
of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended
compiler moving forward. Please transition to use this compiler. Use
'-diag-disable=10441' to disable this message.
icc version 2021.7.0 (gcc version 12.1.0 compatibility)

Arnd Bergmann provided a link to the article, "Intel C/C++ compilers
complete adoption of LLVM".

lib/zstd/common/compiler.h and lib/zstd/compress/zstd_fast.c were kept
untouched for better sync with https://github.com/facebook/zstd

Link: https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.html
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Masahiro Yamada and committed by
Linus Torvalds
95207db8 b01fe98d

+5 -287
+1 -5
arch/ia64/include/uapi/asm/cmpxchg.h
··· 15 15 #include <linux/types.h> 16 16 /* include compiler specific intrinsics */ 17 17 #include <asm/ia64regs.h> 18 - #ifdef __INTEL_COMPILER 19 - # include <asm/intel_intrin.h> 20 - #else 21 - # include <asm/gcc_intrin.h> 22 - #endif 18 + #include <asm/gcc_intrin.h> 23 19 24 20 /* 25 21 * This function doesn't exist, so you'll get a linker error if
-162
arch/ia64/include/uapi/asm/intel_intrin.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef _ASM_IA64_INTEL_INTRIN_H 3 - #define _ASM_IA64_INTEL_INTRIN_H 4 - /* 5 - * Intel Compiler Intrinsics 6 - * 7 - * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com> 8 - * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com> 9 - * Copyright (C) 2005,2006 Hongjiu Lu <hongjiu.lu@intel.com> 10 - * 11 - */ 12 - #include <ia64intrin.h> 13 - 14 - #define ia64_barrier() __memory_barrier() 15 - 16 - #define ia64_stop() /* Nothing: As of now stop bit is generated for each 17 - * intrinsic 18 - */ 19 - 20 - #define ia64_getreg __getReg 21 - #define ia64_setreg __setReg 22 - 23 - #define ia64_hint __hint 24 - #define ia64_hint_pause __hint_pause 25 - 26 - #define ia64_mux1_brcst _m64_mux1_brcst 27 - #define ia64_mux1_mix _m64_mux1_mix 28 - #define ia64_mux1_shuf _m64_mux1_shuf 29 - #define ia64_mux1_alt _m64_mux1_alt 30 - #define ia64_mux1_rev _m64_mux1_rev 31 - 32 - #define ia64_mux1(x,v) _m_to_int64(_m64_mux1(_m_from_int64(x), (v))) 33 - #define ia64_popcnt _m64_popcnt 34 - #define ia64_getf_exp __getf_exp 35 - #define ia64_shrp _m64_shrp 36 - 37 - #define ia64_tpa __tpa 38 - #define ia64_invala __invala 39 - #define ia64_invala_gr __invala_gr 40 - #define ia64_invala_fr __invala_fr 41 - #define ia64_nop __nop 42 - #define ia64_sum __sum 43 - #define ia64_ssm __ssm 44 - #define ia64_rum __rum 45 - #define ia64_rsm __rsm 46 - #define ia64_fc __fc 47 - 48 - #define ia64_ldfs __ldfs 49 - #define ia64_ldfd __ldfd 50 - #define ia64_ldfe __ldfe 51 - #define ia64_ldf8 __ldf8 52 - #define ia64_ldf_fill __ldf_fill 53 - 54 - #define ia64_stfs __stfs 55 - #define ia64_stfd __stfd 56 - #define ia64_stfe __stfe 57 - #define ia64_stf8 __stf8 58 - #define ia64_stf_spill __stf_spill 59 - 60 - #define ia64_mf __mf 61 - #define ia64_mfa __mfa 62 - 63 - #define ia64_fetchadd4_acq __fetchadd4_acq 64 - #define ia64_fetchadd4_rel __fetchadd4_rel 65 - #define ia64_fetchadd8_acq __fetchadd8_acq 66 - #define ia64_fetchadd8_rel __fetchadd8_rel 67 - 68 - #define ia64_xchg1 _InterlockedExchange8 69 - #define ia64_xchg2 _InterlockedExchange16 70 - #define ia64_xchg4 _InterlockedExchange 71 - #define ia64_xchg8 _InterlockedExchange64 72 - 73 - #define ia64_cmpxchg1_rel _InterlockedCompareExchange8_rel 74 - #define ia64_cmpxchg1_acq _InterlockedCompareExchange8_acq 75 - #define ia64_cmpxchg2_rel _InterlockedCompareExchange16_rel 76 - #define ia64_cmpxchg2_acq _InterlockedCompareExchange16_acq 77 - #define ia64_cmpxchg4_rel _InterlockedCompareExchange_rel 78 - #define ia64_cmpxchg4_acq _InterlockedCompareExchange_acq 79 - #define ia64_cmpxchg8_rel _InterlockedCompareExchange64_rel 80 - #define ia64_cmpxchg8_acq _InterlockedCompareExchange64_acq 81 - 82 - #define __ia64_set_dbr(index, val) \ 83 - __setIndReg(_IA64_REG_INDR_DBR, index, val) 84 - #define ia64_set_ibr(index, val) \ 85 - __setIndReg(_IA64_REG_INDR_IBR, index, val) 86 - #define ia64_set_pkr(index, val) \ 87 - __setIndReg(_IA64_REG_INDR_PKR, index, val) 88 - #define ia64_set_pmc(index, val) \ 89 - __setIndReg(_IA64_REG_INDR_PMC, index, val) 90 - #define ia64_set_pmd(index, val) \ 91 - __setIndReg(_IA64_REG_INDR_PMD, index, val) 92 - #define ia64_set_rr(index, val) \ 93 - __setIndReg(_IA64_REG_INDR_RR, index, val) 94 - 95 - #define ia64_get_cpuid(index) \ 96 - __getIndReg(_IA64_REG_INDR_CPUID, index) 97 - #define __ia64_get_dbr(index) __getIndReg(_IA64_REG_INDR_DBR, index) 98 - #define ia64_get_ibr(index) __getIndReg(_IA64_REG_INDR_IBR, index) 99 - #define ia64_get_pkr(index) __getIndReg(_IA64_REG_INDR_PKR, index) 100 - #define ia64_get_pmc(index) __getIndReg(_IA64_REG_INDR_PMC, index) 101 - #define ia64_get_pmd(index) __getIndReg(_IA64_REG_INDR_PMD, index) 102 - #define ia64_get_rr(index) __getIndReg(_IA64_REG_INDR_RR, index) 103 - 104 - #define ia64_srlz_d __dsrlz 105 - #define ia64_srlz_i __isrlz 106 - 107 - #define ia64_dv_serialize_data() 108 - #define ia64_dv_serialize_instruction() 109 - 110 - #define ia64_st1_rel __st1_rel 111 - #define ia64_st2_rel __st2_rel 112 - #define ia64_st4_rel __st4_rel 113 - #define ia64_st8_rel __st8_rel 114 - 115 - /* FIXME: need st4.rel.nta intrinsic */ 116 - #define ia64_st4_rel_nta __st4_rel 117 - 118 - #define ia64_ld1_acq __ld1_acq 119 - #define ia64_ld2_acq __ld2_acq 120 - #define ia64_ld4_acq __ld4_acq 121 - #define ia64_ld8_acq __ld8_acq 122 - 123 - #define ia64_sync_i __synci 124 - #define ia64_thash __thash 125 - #define ia64_ttag __ttag 126 - #define ia64_itcd __itcd 127 - #define ia64_itci __itci 128 - #define ia64_itrd __itrd 129 - #define ia64_itri __itri 130 - #define ia64_ptce __ptce 131 - #define ia64_ptcl __ptcl 132 - #define ia64_ptcg __ptcg 133 - #define ia64_ptcga __ptcga 134 - #define ia64_ptri __ptri 135 - #define ia64_ptrd __ptrd 136 - #define ia64_dep_mi _m64_dep_mi 137 - 138 - /* Values for lfhint in __lfetch and __lfetch_fault */ 139 - 140 - #define ia64_lfhint_none __lfhint_none 141 - #define ia64_lfhint_nt1 __lfhint_nt1 142 - #define ia64_lfhint_nt2 __lfhint_nt2 143 - #define ia64_lfhint_nta __lfhint_nta 144 - 145 - #define ia64_lfetch __lfetch 146 - #define ia64_lfetch_excl __lfetch_excl 147 - #define ia64_lfetch_fault __lfetch_fault 148 - #define ia64_lfetch_fault_excl __lfetch_fault_excl 149 - 150 - #define ia64_intrin_local_irq_restore(x) \ 151 - do { \ 152 - if ((x) != 0) { \ 153 - ia64_ssm(IA64_PSR_I); \ 154 - ia64_srlz_d(); \ 155 - } else { \ 156 - ia64_rsm(IA64_PSR_I); \ 157 - } \ 158 - } while (0) 159 - 160 - #define __builtin_trap() __break(0); 161 - 162 - #endif /* _ASM_IA64_INTEL_INTRIN_H */
+1 -5
arch/ia64/include/uapi/asm/intrinsics.h
··· 14 14 #include <linux/types.h> 15 15 /* include compiler specific intrinsics */ 16 16 #include <asm/ia64regs.h> 17 - #ifdef __INTEL_COMPILER 18 - # include <asm/intel_intrin.h> 19 - #else 20 - # include <asm/gcc_intrin.h> 21 - #endif 17 + #include <asm/gcc_intrin.h> 22 18 #include <asm/cmpxchg.h> 23 19 24 20 #define ia64_set_rr0_to_rr4(val0, val1, val2, val3, val4) \
+1 -4
include/acpi/platform/acenv.h
··· 148 148 * 149 149 *****************************************************************************/ 150 150 151 - #if defined(__GNUC__) && !defined(__INTEL_COMPILER) 151 + #if defined(__GNUC__) 152 152 #include <acpi/platform/acgcc.h> 153 153 154 154 #elif defined(_MSC_VER) 155 155 #include "acmsvc.h" 156 - 157 - #elif defined(__INTEL_COMPILER) 158 - #include <acpi/platform/acintel.h> 159 156 160 157 #endif 161 158
+1 -1
include/acpi/platform/acenvex.h
··· 35 35 36 36 #endif 37 37 38 - #if defined(__GNUC__) && !defined(__INTEL_COMPILER) 38 + #if defined(__GNUC__) 39 39 #include "acgccex.h" 40 40 41 41 #elif defined(_MSC_VER)
-55
include/acpi/platform/acintel.h
··· 1 - /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 2 - /****************************************************************************** 3 - * 4 - * Name: acintel.h - VC specific defines, etc. 5 - * 6 - * Copyright (C) 2000 - 2022, Intel Corp. 7 - * 8 - *****************************************************************************/ 9 - 10 - #ifndef __ACINTEL_H__ 11 - #define __ACINTEL_H__ 12 - 13 - /* 14 - * Use compiler specific <stdarg.h> is a good practice for even when 15 - * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined. 16 - */ 17 - #ifndef va_arg 18 - #include <stdarg.h> 19 - #endif 20 - 21 - /* Configuration specific to Intel 64-bit C compiler */ 22 - 23 - #define COMPILER_DEPENDENT_INT64 __int64 24 - #define COMPILER_DEPENDENT_UINT64 unsigned __int64 25 - #define ACPI_INLINE __inline 26 - 27 - /* 28 - * Calling conventions: 29 - * 30 - * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) 31 - * ACPI_EXTERNAL_XFACE - External ACPI interfaces 32 - * ACPI_INTERNAL_XFACE - Internal ACPI interfaces 33 - * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces 34 - */ 35 - #define ACPI_SYSTEM_XFACE 36 - #define ACPI_EXTERNAL_XFACE 37 - #define ACPI_INTERNAL_XFACE 38 - #define ACPI_INTERNAL_VAR_XFACE 39 - 40 - /* remark 981 - operands evaluated in no particular order */ 41 - #pragma warning(disable:981) 42 - 43 - /* warn C4100: unreferenced formal parameter */ 44 - #pragma warning(disable:4100) 45 - 46 - /* warn C4127: conditional expression is constant */ 47 - #pragma warning(disable:4127) 48 - 49 - /* warn C4706: assignment within conditional expression */ 50 - #pragma warning(disable:4706) 51 - 52 - /* warn C4214: bit field types other than int */ 53 - #pragma warning(disable:4214) 54 - 55 - #endif /* __ACINTEL_H__ */
-34
include/linux/compiler-intel.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef __LINUX_COMPILER_TYPES_H 3 - #error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead." 4 - #endif 5 - 6 - #ifdef __ECC 7 - 8 - /* Compiler specific definitions for Intel ECC compiler */ 9 - 10 - #include <asm/intrinsics.h> 11 - 12 - /* Intel ECC compiler doesn't support gcc specific asm stmts. 13 - * It uses intrinsics to do the equivalent things. 14 - */ 15 - 16 - #define barrier() __memory_barrier() 17 - #define barrier_data(ptr) barrier() 18 - 19 - #define RELOC_HIDE(ptr, off) \ 20 - ({ unsigned long __ptr; \ 21 - __ptr = (unsigned long) (ptr); \ 22 - (typeof(ptr)) (__ptr + (off)); }) 23 - 24 - /* This should act as an optimization barrier on var. 25 - * Given that this compiler does not have inline assembly, a compiler barrier 26 - * is the best we can do. 27 - */ 28 - #define OPTIMIZER_HIDE_VAR(var) barrier() 29 - 30 - #endif 31 - 32 - /* icc has this, but it's called _bswap16 */ 33 - #define __HAVE_BUILTIN_BSWAP16__ 34 - #define __builtin_bswap16 _bswap16
+1 -13
include/linux/compiler_attributes.h
··· 64 64 * compiler should see some alignment anyway, when the return value is 65 65 * massaged by 'flags = ptr & 3; ptr &= ~3;'). 66 66 * 67 - * Optional: not supported by icc 68 - * 69 67 * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-assume_005faligned-function-attribute 70 68 * clang: https://clang.llvm.org/docs/AttributeReference.html#assume-aligned 71 69 */ 72 - #if __has_attribute(__assume_aligned__) 73 - # define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) 74 - #else 75 - # define __assume_aligned(a, ...) 76 - #endif 70 + #define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) 77 71 78 72 /* 79 73 * Note the long name. ··· 79 85 /* 80 86 * Optional: only supported since gcc >= 9 81 87 * Optional: not supported by clang 82 - * Optional: not supported by icc 83 88 * 84 89 * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-copy-function-attribute 85 90 */ ··· 91 98 /* 92 99 * Optional: not supported by gcc 93 100 * Optional: only supported since clang >= 14.0 94 - * Optional: not supported by icc 95 101 * 96 102 * clang: https://clang.llvm.org/docs/AttributeReference.html#diagnose_as_builtin 97 103 */ ··· 114 122 115 123 /* 116 124 * Optional: not supported by clang 117 - * Optional: not supported by icc 118 125 * 119 126 * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-designated_005finit-type-attribute 120 127 */ ··· 227 236 /* 228 237 * Optional: only supported since gcc >= 8 229 238 * Optional: not supported by clang 230 - * Optional: not supported by icc 231 239 * 232 240 * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-nonstring-variable-attribute 233 241 */ ··· 257 267 258 268 /* 259 269 * Optional: not supported by gcc. 260 - * Optional: not supported by icc. 261 270 * 262 271 * clang: https://clang.llvm.org/docs/AttributeReference.html#overloadable 263 272 */ ··· 276 287 * Note: the "type" argument should match any __builtin_object_size(p, type) usage. 277 288 * 278 289 * Optional: not supported by gcc. 279 - * Optional: not supported by icc. 280 290 * 281 291 * clang: https://clang.llvm.org/docs/AttributeReference.html#pass-object-size-pass-dynamic-object-size 282 292 */
-2
include/linux/compiler_types.h
··· 120 120 /* Compiler specific macros. */ 121 121 #ifdef __clang__ 122 122 #include <linux/compiler-clang.h> 123 - #elif defined(__INTEL_COMPILER) 124 - #include <linux/compiler-intel.h> 125 123 #elif defined(__GNUC__) 126 124 /* The above compilers also define __GNUC__, so order is important here. */ 127 125 #include <linux/compiler-gcc.h>
-2
scripts/cc-version.sh
··· 12 12 cat <<- EOF | "$@" -E -P -x c - 2>/dev/null 13 13 #if defined(__clang__) 14 14 Clang __clang_major__ __clang_minor__ __clang_patchlevel__ 15 - #elif defined(__INTEL_COMPILER) 16 - ICC __INTEL_COMPILER __INTEL_COMPILER_UPDATE 17 15 #elif defined(__GNUC__) 18 16 GCC __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ 19 17 #else
-4
scripts/min-tool-version.sh
··· 19 19 gcc) 20 20 echo 5.1.0 21 21 ;; 22 - icc) 23 - # temporary 24 - echo 16.0.3 25 - ;; 26 22 llvm) 27 23 if [ "$SRCARCH" = s390 ]; then 28 24 echo 15.0.0