History

Merge tag 'x86_cleanups_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cleanups from Borislav Petkov: - Simplify inline asm flag output operands now that the minimum compiler version supports the =@ccCOND syntax - Remove a bunch of AS_* Kconfig symbols which detect assembler support for various instruction mnemonics now that the minimum assembler version supports them all - The usual cleanups all over the place * tag 'x86_cleanups_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Remove code depending on __GCC_ASM_FLAG_OUTPUTS__ x86/sgx: Use ENCLS mnemonic in <kernel/cpu/sgx/encls.h> x86/mtrr: Remove license boilerplate text with bad FSF address x86/asm: Use RDPKRU and WRPKRU mnemonics in <asm/special_insns.h> x86/idle: Use MONITORX and MWAITX mnemonics in <asm/mwait.h> x86/entry/fred: Push __KERNEL_CS directly x86/kconfig: Remove CONFIG_AS_AVX512 crypto: x86 - Remove CONFIG_AS_VPCLMULQDQ crypto: X86 - Remove CONFIG_AS_VAES crypto: x86 - Remove CONFIG_AS_GFNI x86/kconfig: Drop unused and needless config X86_64_SMP

Linus Torvalds committed 1 year ago

Commit 2f0a7502 parents 6bb71f0 c6c973d34 files · +55 −239Browse files

Unified · Split

34 files
  1. arch/x86/Kconfig +0 −4
  2. arch/x86/Kconfig.assembler +0 −20
  3. arch/x86/boot/bitops.h +1 −1
  4. arch/x86/boot/boot.h +4 −4
  5. arch/x86/boot/string.c +2 −2
  6. arch/x86/crypto/Kconfig +1 −1
  7. arch/x86/crypto/Makefile +2 −4
  8. arch/x86/crypto/aes-ctr-avx-x86_64.S +0 −2
  9. arch/x86/crypto/aes-xts-avx-x86_64.S +0 −2
  10. arch/x86/crypto/aesni-intel_glue.c +3 −19
  11. arch/x86/crypto/aria-aesni-avx-asm_64.S +0 −10
  12. arch/x86/crypto/aria-aesni-avx2-asm_64.S +1 −9
  13. arch/x86/crypto/aria_aesni_avx2_glue.c +1 −3
  14. arch/x86/crypto/aria_aesni_avx_glue.c +1 −3
  15. arch/x86/entry/entry_64_fred.S +1 −2
  16. arch/x86/include/asm/archrandom.h +2 −4
  17. arch/x86/include/asm/asm.h +0 −12
  18. arch/x86/include/asm/bitops.h +6 −12
  19. arch/x86/include/asm/cmpxchg.h +4 −8
  20. arch/x86/include/asm/cmpxchg_32.h +2 −4
  21. arch/x86/include/asm/cmpxchg_64.h +1 −2
  22. arch/x86/include/asm/mtrr.h +1 −14
  23. arch/x86/include/asm/mwait.h +2 −6
  24. arch/x86/include/asm/percpu.h +4 −8
  25. arch/x86/include/asm/rmwcc.h +2 −24
  26. arch/x86/include/asm/sev.h +1 −2
  27. arch/x86/include/asm/signal.h +1 −2
  28. arch/x86/include/asm/special_insns.h +3 −7
  29. arch/x86/include/asm/uaccess.h +3 −4
  30. arch/x86/kernel/cpu/mtrr/cleanup.c +1 −14
  31. arch/x86/kernel/cpu/mtrr/mtrr.c +1 −14
  32. arch/x86/kernel/cpu/sgx/encls.h +3 −3
  33. tools/arch/x86/include/asm/asm.h +0 −12
  34. tools/perf/bench/find-bit-bench.c +1 −1
arch/x86/Kconfig+0−4
@@ -412,10 +412,6 @@ config HAVE_INTEL_TXT · 411 unmodified lines
412412 def_bool y
413413 depends on INTEL_IOMMU && ACPI
414414
415−config X86_64_SMP
416− def_bool y
417− depends on X86_64 && SMP
418−
419415 config ARCH_SUPPORTS_UPROBES
420416 def_bool y
421417
arch/x86/Kconfig.assembler+0−20
@@ -1,26 +1,6 @@
11 # SPDX-License-Identifier: GPL-2.0
22 # Copyright (C) 2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
33
4−config AS_AVX512
5− def_bool $(as-instr,vpmovm2b %k1$(comma)%zmm5)
6− help
7− Supported by binutils >= 2.25 and LLVM integrated assembler
8−
9−config AS_GFNI
10− def_bool $(as-instr,vgf2p8mulb %xmm0$(comma)%xmm1$(comma)%xmm2)
11− help
12− Supported by binutils >= 2.30 and LLVM integrated assembler
13−
14−config AS_VAES
15− def_bool $(as-instr,vaesenc %ymm0$(comma)%ymm1$(comma)%ymm2)
16− help
17− Supported by binutils >= 2.30 and LLVM integrated assembler
18−
19−config AS_VPCLMULQDQ
20− def_bool $(as-instr,vpclmulqdq \$0x10$(comma)%ymm0$(comma)%ymm1$(comma)%ymm2)
21− help
22− Supported by binutils >= 2.30 and LLVM integrated assembler
23−
244 config AS_WRUSS
255 def_bool $(as-instr64,wrussq %rax$(comma)(%rbx))
266 help
arch/x86/boot/bitops.h+1−1
@@ -27,7 +27,7 @@ static inline bool variable_test_bit(int nr, const void *addr) · 26 unmodified lines
2727 bool v;
2828 const u32 *p = addr;
2929
30− asm("btl %2,%1" CC_SET(c) : CC_OUT(c) (v) : "m" (*p), "Ir" (nr));
30+ asm("btl %2,%1" : "=@ccc" (v) : "m" (*p), "Ir" (nr));
3131 return v;
3232 }
3333
arch/x86/boot/boot.h+4−4
@@ -155,15 +155,15 @@ static inline void wrgs32(u32 v, addr_t addr) · 154 unmodified lines
155155 static inline bool memcmp_fs(const void *s1, addr_t s2, size_t len)
156156 {
157157 bool diff;
158− asm volatile("fs repe cmpsb" CC_SET(nz)
159− : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
158+ asm volatile("fs repe cmpsb"
159+ : "=@ccnz" (diff), "+D" (s1), "+S" (s2), "+c" (len));
160160 return diff;
161161 }
162162 static inline bool memcmp_gs(const void *s1, addr_t s2, size_t len)
163163 {
164164 bool diff;
165− asm volatile("gs repe cmpsb" CC_SET(nz)
166− : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
165+ asm volatile("gs repe cmpsb"
166+ : "=@ccnz" (diff), "+D" (s1), "+S" (s2), "+c" (len));
167167 return diff;
168168 }
169169
arch/x86/boot/string.c+2−2
@@ -32,8 +32,8 @@ · 31 unmodified lines
3232 int memcmp(const void *s1, const void *s2, size_t len)
3333 {
3434 bool diff;
35− asm("repe cmpsb" CC_SET(nz)
36− : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
35+ asm("repe cmpsb"
36+ : "=@ccnz" (diff), "+D" (s1), "+S" (s2), "+c" (len));
3737 return diff;
3838 }
3939
arch/x86/crypto/Kconfig+1−1
@@ -306,7 +306,7 @@ config CRYPTO_ARIA_AESNI_AVX2_X86_64 · 305 unmodified lines
306306
307307 config CRYPTO_ARIA_GFNI_AVX512_X86_64
308308 tristate "Ciphers: ARIA with modes: ECB, CTR (AVX512/GFNI)"
309− depends on 64BIT && AS_GFNI
309+ depends on 64BIT
310310 select CRYPTO_SKCIPHER
311311 select CRYPTO_ALGAPI
312312 select CRYPTO_ARIA
arch/x86/crypto/Makefile+2−4
@@ -46,10 +46,8 @@ obj-$(CONFIG_CRYPTO_AES_NI_INTEL) += aesni-intel.o · 45 unmodified lines
4646 aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o
4747 aesni-intel-$(CONFIG_64BIT) += aes-ctr-avx-x86_64.o \
4848 aes-gcm-aesni-x86_64.o \
49− aes-xts-avx-x86_64.o
50−ifeq ($(CONFIG_AS_VAES)$(CONFIG_AS_VPCLMULQDQ),yy)
51−aesni-intel-$(CONFIG_64BIT) += aes-gcm-avx10-x86_64.o
52−endif
49+ aes-xts-avx-x86_64.o \
50+ aes-gcm-avx10-x86_64.o
5351
5452 obj-$(CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL) += ghash-clmulni-intel.o
5553 ghash-clmulni-intel-y := ghash-clmulni-intel_asm.o ghash-clmulni-intel_glue.o
arch/x86/crypto/aes-ctr-avx-x86_64.S+0−2
@@ -552,7 +552,6 @@ SYM_TYPED_FUNC_START(aes_xctr_crypt_aesni_avx) · 551 unmodified lines
552552 _aes_ctr_crypt 1
553553 SYM_FUNC_END(aes_xctr_crypt_aesni_avx)
554554
555−#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
556555 .set VL, 32
557556 .set USE_AVX512, 0
558557 SYM_TYPED_FUNC_START(aes_ctr64_crypt_vaes_avx2)
@@ -570,4 +569,3 @@ SYM_FUNC_END(aes_ctr64_crypt_vaes_avx512) · 11 unmodified lines
570569 SYM_TYPED_FUNC_START(aes_xctr_crypt_vaes_avx512)
571570 _aes_ctr_crypt 1
572571 SYM_FUNC_END(aes_xctr_crypt_vaes_avx512)
573−#endif // CONFIG_AS_VAES && CONFIG_AS_VPCLMULQDQ
arch/x86/crypto/aes-xts-avx-x86_64.S+0−2
@@ -886,7 +886,6 @@ SYM_TYPED_FUNC_START(aes_xts_decrypt_aesni_avx) · 885 unmodified lines
886886 _aes_xts_crypt 0
887887 SYM_FUNC_END(aes_xts_decrypt_aesni_avx)
888888
889−#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
890889 .set VL, 32
891890 .set USE_AVX512, 0
892891 SYM_TYPED_FUNC_START(aes_xts_encrypt_vaes_avx2)
@@ -904,4 +903,3 @@ SYM_FUNC_END(aes_xts_encrypt_vaes_avx512) · 11 unmodified lines
904903 SYM_TYPED_FUNC_START(aes_xts_decrypt_vaes_avx512)
905904 _aes_xts_crypt 0
906905 SYM_FUNC_END(aes_xts_decrypt_vaes_avx512)
907−#endif /* CONFIG_AS_VAES && CONFIG_AS_VPCLMULQDQ */
arch/x86/crypto/aesni-intel_glue.c+3−19
@@ -828,10 +828,8 @@ static struct skcipher_alg skcipher_algs_##suffix[] = {{ \ · 827 unmodified lines
828828 }}
829829
830830 DEFINE_AVX_SKCIPHER_ALGS(aesni_avx, "aesni-avx", 500);
831−#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
832831 DEFINE_AVX_SKCIPHER_ALGS(vaes_avx2, "vaes-avx2", 600);
833832 DEFINE_AVX_SKCIPHER_ALGS(vaes_avx512, "vaes-avx512", 800);
834−#endif
835833
836834 /* The common part of the x86_64 AES-GCM key struct */
837835 struct aes_gcm_key {
@@ -912,17 +910,8 @@ struct aes_gcm_key_avx10 { · 74 unmodified lines
912910 #define FLAG_RFC4106 BIT(0)
913911 #define FLAG_ENC BIT(1)
914912 #define FLAG_AVX BIT(2)
915−#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
916−# define FLAG_AVX10_256 BIT(3)
917−# define FLAG_AVX10_512 BIT(4)
918−#else
919− /*
920− * This should cause all calls to the AVX10 assembly functions to be
921− * optimized out, avoiding the need to ifdef each call individually.
922− */
923−# define FLAG_AVX10_256 0
924−# define FLAG_AVX10_512 0
925−#endif
913+#define FLAG_AVX10_256 BIT(3)
914+#define FLAG_AVX10_512 BIT(4)
926915
927916 static inline struct aes_gcm_key *
928917 aes_gcm_key_get(struct crypto_aead *tfm, int flags)
@@ -1519,7 +1508,6 @@ DEFINE_GCM_ALGS(aesni_avx, FLAG_AVX, · 590 unmodified lines
15191508 "generic-gcm-aesni-avx", "rfc4106-gcm-aesni-avx",
15201509 AES_GCM_KEY_AESNI_SIZE, 500);
15211510
1522−#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
15231511 /* aes_gcm_algs_vaes_avx10_256 */
15241512 DEFINE_GCM_ALGS(vaes_avx10_256, FLAG_AVX10_256,
15251513 "generic-gcm-vaes-avx10_256", "rfc4106-gcm-vaes-avx10_256",
@@ -1529,7 +1517,6 @@ DEFINE_GCM_ALGS(vaes_avx10_256, FLAG_AVX10_256, · 3 unmodified lines
15291517 DEFINE_GCM_ALGS(vaes_avx10_512, FLAG_AVX10_512,
15301518 "generic-gcm-vaes-avx10_512", "rfc4106-gcm-vaes-avx10_512",
15311519 AES_GCM_KEY_AVX10_SIZE, 800);
1532−#endif /* CONFIG_AS_VAES && CONFIG_AS_VPCLMULQDQ */
15331520
15341521 static int __init register_avx_algs(void)
15351522 {
@@ -1551,7 +1538,6 @@ static int __init register_avx_algs(void) · 15 unmodified lines
15511538 * Similarly, the assembler support was added at about the same time.
15521539 * For simplicity, just always check for VAES and VPCLMULQDQ together.
15531540 */
1554−#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
15551541 if (!boot_cpu_has(X86_FEATURE_AVX2) ||
15561542 !boot_cpu_has(X86_FEATURE_VAES) ||
15571543 !boot_cpu_has(X86_FEATURE_VPCLMULQDQ) ||
@@ -1592,7 +1578,7 @@ static int __init register_avx_algs(void) · 34 unmodified lines
15921578 ARRAY_SIZE(aes_gcm_algs_vaes_avx10_512));
15931579 if (err)
15941580 return err;
1595−#endif /* CONFIG_AS_VAES && CONFIG_AS_VPCLMULQDQ */
1581+
15961582 return 0;
15971583 }
15981584
@@ -1607,12 +1593,10 @@ static void unregister_avx_algs(void) · 8 unmodified lines
16071593 {
16081594 unregister_skciphers(skcipher_algs_aesni_avx);
16091595 unregister_aeads(aes_gcm_algs_aesni_avx);
1610−#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
16111596 unregister_skciphers(skcipher_algs_vaes_avx2);
16121597 unregister_skciphers(skcipher_algs_vaes_avx512);
16131598 unregister_aeads(aes_gcm_algs_vaes_avx10_256);
16141599 unregister_aeads(aes_gcm_algs_vaes_avx10_512);
1615−#endif
16161600 }
16171601 #else /* CONFIG_X86_64 */
16181602 static struct aead_alg aes_gcm_algs_aesni[0];
arch/x86/crypto/aria-aesni-avx-asm_64.S+0−10
@@ -295,7 +295,6 @@ · 294 unmodified lines
295295 vpshufb t1, t0, t2; \
296296 vpxor t2, x7, x7;
297297
298−#ifdef CONFIG_AS_GFNI
299298 #define aria_sbox_8way_gfni(x0, x1, x2, x3, \
300299 x4, x5, x6, x7, \
301300 t0, t1, t2, t3, \
@@ -318,8 +317,6 @@ · 16 unmodified lines
318317 vgf2p8affineinvqb $0, t2, x3, x3; \
319318 vgf2p8affineinvqb $0, t2, x7, x7
320319
321−#endif /* CONFIG_AS_GFNI */
322−
323320 #define aria_sbox_8way(x0, x1, x2, x3, \
324321 x4, x5, x6, x7, \
325322 t0, t1, t2, t3, \
@@ -561,7 +558,6 @@ · 235 unmodified lines
561558 y4, y5, y6, y7, \
562559 mem_tmp, 8);
563560
564−#ifdef CONFIG_AS_GFNI
565561 #define aria_fe_gfni(x0, x1, x2, x3, \
566562 x4, x5, x6, x7, \
567563 y0, y1, y2, y3, \
@@ -719,8 +715,6 @@ · 151 unmodified lines
719715 y4, y5, y6, y7, \
720716 mem_tmp, 8);
721717
722−#endif /* CONFIG_AS_GFNI */
723−
724718 /* NB: section is mergeable, all elements must be aligned 16-byte blocks */
725719 .section .rodata.cst16, "aM", @progbits, 16
726720 .align 16
@@ -772,7 +766,6 @@ · 45 unmodified lines
772766 .Ltf_hi__x2__and__fwd_aff:
773767 .octa 0x3F893781E95FE1576CDA64D2BA0CB204
774768
775−#ifdef CONFIG_AS_GFNI
776769 /* AES affine: */
777770 #define tf_aff_const BV8(1, 1, 0, 0, 0, 1, 1, 0)
778771 .Ltf_aff_bitmatrix:
@@ -871,7 +864,6 @@ · 92 unmodified lines
871864 BV8(0, 0, 0, 0, 0, 1, 0, 0),
872865 BV8(0, 0, 0, 0, 0, 0, 1, 0),
873866 BV8(0, 0, 0, 0, 0, 0, 0, 1))
874−#endif /* CONFIG_AS_GFNI */
875867
876868 /* 4-bit mask */
877869 .section .rodata.cst4.L0f0f0f0f, "aM", @progbits, 4
@@ -1140,7 +1132,6 @@ SYM_TYPED_FUNC_START(aria_aesni_avx_ctr_crypt_16way) · 262 unmodified lines
11401132 RET;
11411133 SYM_FUNC_END(aria_aesni_avx_ctr_crypt_16way)
11421134
1143−#ifdef CONFIG_AS_GFNI
11441135 SYM_FUNC_START_LOCAL(__aria_aesni_avx_gfni_crypt_16way)
11451136 /* input:
11461137 * %r9: rk
@@ -1359,4 +1350,3 @@ SYM_TYPED_FUNC_START(aria_aesni_avx_gfni_ctr_crypt_16way) · 212 unmodified lines
13591350 FRAME_END
13601351 RET;
13611352 SYM_FUNC_END(aria_aesni_avx_gfni_ctr_crypt_16way)
1362−#endif /* CONFIG_AS_GFNI */
arch/x86/crypto/aria-aesni-avx2-asm_64.S+1−9
@@ -302,7 +302,6 @@ · 301 unmodified lines
302302 vpbroadcastb ((round * 16) + idx + 4)(rk), t0; \
303303 vpxor t0, x7, x7;
304304
305−#ifdef CONFIG_AS_GFNI
306305 #define aria_sbox_8way_gfni(x0, x1, x2, x3, \
307306 x4, x5, x6, x7, \
308307 t0, t1, t2, t3, \
@@ -325,7 +324,6 @@ · 16 unmodified lines
325324 vgf2p8affineinvqb $0, t2, x3, x3; \
326325 vgf2p8affineinvqb $0, t2, x7, x7
327326
328−#endif /* CONFIG_AS_GFNI */
329327 #define aria_sbox_8way(x0, x1, x2, x3, \
330328 x4, x5, x6, x7, \
331329 t0, t1, t2, t3, \
@@ -598,7 +596,7 @@ · 266 unmodified lines
598596 aria_load_state_8way(y0, y1, y2, y3, \
599597 y4, y5, y6, y7, \
600598 mem_tmp, 8);
601−#ifdef CONFIG_AS_GFNI
599+
602600 #define aria_fe_gfni(x0, x1, x2, x3, \
603601 x4, x5, x6, x7, \
604602 y0, y1, y2, y3, \
@@ -752,7 +750,6 @@ · 147 unmodified lines
752750 aria_load_state_8way(y0, y1, y2, y3, \
753751 y4, y5, y6, y7, \
754752 mem_tmp, 8);
755−#endif /* CONFIG_AS_GFNI */
756753
757754 .section .rodata.cst32.shufb_16x16b, "aM", @progbits, 32
758755 .align 32
@@ -806,7 +803,6 @@ · 47 unmodified lines
806803 .Ltf_hi__x2__and__fwd_aff:
807804 .octa 0x3F893781E95FE1576CDA64D2BA0CB204
808805
809−#ifdef CONFIG_AS_GFNI
810806 .section .rodata.cst8, "aM", @progbits, 8
811807 .align 8
812808 /* AES affine: */
@@ -868,8 +864,6 @@ · 55 unmodified lines
868864 BV8(0, 0, 0, 0, 0, 0, 1, 0),
869865 BV8(0, 0, 0, 0, 0, 0, 0, 1))
870866
871−#endif /* CONFIG_AS_GFNI */
872−
873867 /* 4-bit mask */
874868 .section .rodata.cst4.L0f0f0f0f, "aM", @progbits, 4
875869 .align 4
@@ -1219,7 +1213,6 @@ SYM_TYPED_FUNC_START(aria_aesni_avx2_ctr_crypt_32way) · 343 unmodified lines
12191213 RET;
12201214 SYM_FUNC_END(aria_aesni_avx2_ctr_crypt_32way)
12211215
1222−#ifdef CONFIG_AS_GFNI
12231216 SYM_FUNC_START_LOCAL(__aria_aesni_avx2_gfni_crypt_32way)
12241217 /* input:
12251218 * %r9: rk
@@ -1438,4 +1431,3 @@ SYM_TYPED_FUNC_START(aria_aesni_avx2_gfni_ctr_crypt_32way) · 212 unmodified lines
14381431 FRAME_END
14391432 RET;
14401433 SYM_FUNC_END(aria_aesni_avx2_gfni_ctr_crypt_32way)
1441−#endif /* CONFIG_AS_GFNI */
arch/x86/crypto/aria_aesni_avx2_glue.c+1−3
@@ -26,7 +26,6 @@ asmlinkage void aria_aesni_avx2_ctr_crypt_32way(const void *ctx, u8 *dst, · 25 unmodified lines
2626 const u8 *src,
2727 u8 *keystream, u8 *iv);
2828 EXPORT_SYMBOL_GPL(aria_aesni_avx2_ctr_crypt_32way);
29−#ifdef CONFIG_AS_GFNI
3029 asmlinkage void aria_aesni_avx2_gfni_encrypt_32way(const void *ctx, u8 *dst,
3130 const u8 *src);
3231 EXPORT_SYMBOL_GPL(aria_aesni_avx2_gfni_encrypt_32way);
@@ -37,7 +36,6 @@ asmlinkage void aria_aesni_avx2_gfni_ctr_crypt_32way(const void *ctx, u8 *dst, · 4 unmodified lines
3736 const u8 *src,
3837 u8 *keystream, u8 *iv);
3938 EXPORT_SYMBOL_GPL(aria_aesni_avx2_gfni_ctr_crypt_32way);
40−#endif /* CONFIG_AS_GFNI */
4139
4240 static struct aria_avx_ops aria_ops;
4341
@@ -213,7 +211,7 @@ static int __init aria_avx2_init(void) · 169 unmodified lines
213211 return -ENODEV;
214212 }
215213
216− if (boot_cpu_has(X86_FEATURE_GFNI) && IS_ENABLED(CONFIG_AS_GFNI)) {
214+ if (boot_cpu_has(X86_FEATURE_GFNI)) {
217215 aria_ops.aria_encrypt_16way = aria_aesni_avx_gfni_encrypt_16way;
218216 aria_ops.aria_decrypt_16way = aria_aesni_avx_gfni_decrypt_16way;
219217 aria_ops.aria_ctr_crypt_16way = aria_aesni_avx_gfni_ctr_crypt_16way;
arch/x86/crypto/aria_aesni_avx_glue.c+1−3
@@ -26,7 +26,6 @@ asmlinkage void aria_aesni_avx_ctr_crypt_16way(const void *ctx, u8 *dst, · 25 unmodified lines
2626 const u8 *src,
2727 u8 *keystream, u8 *iv);
2828 EXPORT_SYMBOL_GPL(aria_aesni_avx_ctr_crypt_16way);
29−#ifdef CONFIG_AS_GFNI
3029 asmlinkage void aria_aesni_avx_gfni_encrypt_16way(const void *ctx, u8 *dst,
3130 const u8 *src);
3231 EXPORT_SYMBOL_GPL(aria_aesni_avx_gfni_encrypt_16way);
@@ -37,7 +36,6 @@ asmlinkage void aria_aesni_avx_gfni_ctr_crypt_16way(const void *ctx, u8 *dst, · 4 unmodified lines
3736 const u8 *src,
3837 u8 *keystream, u8 *iv);
3938 EXPORT_SYMBOL_GPL(aria_aesni_avx_gfni_ctr_crypt_16way);
40−#endif /* CONFIG_AS_GFNI */
4139
4240 static struct aria_avx_ops aria_ops;
4341
@@ -199,7 +197,7 @@ static int __init aria_avx_init(void) · 155 unmodified lines
199197 return -ENODEV;
200198 }
201199
202− if (boot_cpu_has(X86_FEATURE_GFNI) && IS_ENABLED(CONFIG_AS_GFNI)) {
200+ if (boot_cpu_has(X86_FEATURE_GFNI)) {
203201 aria_ops.aria_encrypt_16way = aria_aesni_avx_gfni_encrypt_16way;
204202 aria_ops.aria_decrypt_16way = aria_aesni_avx_gfni_decrypt_16way;
205203 aria_ops.aria_ctr_crypt_16way = aria_aesni_avx_gfni_ctr_crypt_16way;
arch/x86/entry/entry_64_fred.S+1−2
@@ -97,8 +97,7 @@ SYM_FUNC_START(asm_fred_entry_from_kvm) · 96 unmodified lines
9797 push %rdi /* fred_ss handed in by the caller */
9898 push %rbp
9999 pushf
100− mov $__KERNEL_CS, %rax
101− push %rax
100+ push $__KERNEL_CS
102101
103102 /*
104103 * Unlike the IDT event delivery, FRED _always_ pushes an error code
arch/x86/include/asm/archrandom.h+2−4
@@ -23,8 +23,7 @@ static inline bool __must_check rdrand_long(unsigned long *v) · 22 unmodified lines
2323 unsigned int retry = RDRAND_RETRY_LOOPS;
2424 do {
2525 asm volatile("rdrand %[out]"
26− CC_SET(c)
27− : CC_OUT(c) (ok), [out] "=r" (*v));
26+ : "=@ccc" (ok), [out] "=r" (*v));
2827 if (ok)
2928 return true;
3029 } while (--retry);
@@ -35,8 +34,7 @@ static inline bool __must_check rdseed_long(unsigned long *v) · 4 unmodified lines
3534 {
3635 bool ok;
3736 asm volatile("rdseed %[out]"
38− CC_SET(c)
39− : CC_OUT(c) (ok), [out] "=r" (*v));
37+ : "=@ccc" (ok), [out] "=r" (*v));
4038 return ok;
4139 }
4240
arch/x86/include/asm/asm.h+0−12
@@ -122,18 +122,6 @@ static __always_inline __pure void *rip_rel_ptr(void *p) · 121 unmodified lines
122122 }
123123 #endif
124124
125−/*
126− * Macros to generate condition code outputs from inline assembly,
127− * The output operand must be type "bool".
128− */
129−#ifdef __GCC_ASM_FLAG_OUTPUTS__
130−# define CC_SET(c) "\n\t/* output condition code " #c "*/\n"
131−# define CC_OUT(c) "=@cc" #c
132−#else
133−# define CC_SET(c) "\n\tset" #c " %[_cc_" #c "]\n"
134−# define CC_OUT(c) [_cc_ ## c] "=qm"
135−#endif
136−
137125 #ifdef __KERNEL__
138126
139127 # include <asm/extable_fixup_types.h>
arch/x86/include/asm/bitops.h+6−12
@@ -99,8 +99,7 @@ static __always_inline bool arch_xor_unlock_is_negative_byte(unsigned long mask, · 98 unmodified lines
9999 {
100100 bool negative;
101101 asm_inline volatile(LOCK_PREFIX "xorb %2,%1"
102− CC_SET(s)
103− : CC_OUT(s) (negative), WBYTE_ADDR(addr)
102+ : "=@ccs" (negative), WBYTE_ADDR(addr)
104103 : "iq" ((char)mask) : "memory");
105104 return negative;
106105 }
@@ -149,8 +148,7 @@ arch___test_and_set_bit(unsigned long nr, volatile unsigned long *addr) · 42 unmodified lines
149148 bool oldbit;
150149
151150 asm(__ASM_SIZE(bts) " %2,%1"
152− CC_SET(c)
153− : CC_OUT(c) (oldbit)
151+ : "=@ccc" (oldbit)
154152 : ADDR, "Ir" (nr) : "memory");
155153 return oldbit;
156154 }
@@ -175,8 +173,7 @@ arch___test_and_clear_bit(unsigned long nr, volatile unsigned long *addr) · 18 unmodified lines
175173 bool oldbit;
176174
177175 asm volatile(__ASM_SIZE(btr) " %2,%1"
178− CC_SET(c)
179− : CC_OUT(c) (oldbit)
176+ : "=@ccc" (oldbit)
180177 : ADDR, "Ir" (nr) : "memory");
181178 return oldbit;
182179 }
@@ -187,8 +184,7 @@ arch___test_and_change_bit(unsigned long nr, volatile unsigned long *addr) · 4 unmodified lines
187184 bool oldbit;
188185
189186 asm volatile(__ASM_SIZE(btc) " %2,%1"
190− CC_SET(c)
191− : CC_OUT(c) (oldbit)
187+ : "=@ccc" (oldbit)
192188 : ADDR, "Ir" (nr) : "memory");
193189
194190 return oldbit;
@@ -211,8 +207,7 @@ static __always_inline bool constant_test_bit_acquire(long nr, const volatile un · 16 unmodified lines
211207 bool oldbit;
212208
213209 asm volatile("testb %2,%1"
214− CC_SET(nz)
215− : CC_OUT(nz) (oldbit)
210+ : "=@ccnz" (oldbit)
216211 : "m" (((unsigned char *)addr)[nr >> 3]),
217212 "i" (1 << (nr & 7))
218213 :"memory");
@@ -225,8 +220,7 @@ static __always_inline bool variable_test_bit(long nr, volatile const unsigned l · 6 unmodified lines
225220 bool oldbit;
226221
227222 asm volatile(__ASM_SIZE(bt) " %2,%1"
228− CC_SET(c)
229− : CC_OUT(c) (oldbit)
223+ : "=@ccc" (oldbit)
230224 : "m" (*(unsigned long *)addr), "Ir" (nr) : "memory");
231225
232226 return oldbit;
arch/x86/include/asm/cmpxchg.h+4−8
@@ -166,8 +166,7 @@ extern void __add_wrong_size(void) · 165 unmodified lines
166166 { \
167167 volatile u8 *__ptr = (volatile u8 *)(_ptr); \
168168 asm_inline volatile(lock "cmpxchgb %[new], %[ptr]" \
169− CC_SET(z) \
170− : CC_OUT(z) (success), \
169+ : "=@ccz" (success), \
171170 [ptr] "+m" (*__ptr), \
172171 [old] "+a" (__old) \
173172 : [new] "q" (__new) \
@@ -178,8 +177,7 @@ extern void __add_wrong_size(void) · 4 unmodified lines
178177 { \
179178 volatile u16 *__ptr = (volatile u16 *)(_ptr); \
180179 asm_inline volatile(lock "cmpxchgw %[new], %[ptr]" \
181− CC_SET(z) \
182− : CC_OUT(z) (success), \
180+ : "=@ccz" (success), \
183181 [ptr] "+m" (*__ptr), \
184182 [old] "+a" (__old) \
185183 : [new] "r" (__new) \
@@ -190,8 +188,7 @@ extern void __add_wrong_size(void) · 4 unmodified lines
190188 { \
191189 volatile u32 *__ptr = (volatile u32 *)(_ptr); \
192190 asm_inline volatile(lock "cmpxchgl %[new], %[ptr]" \
193− CC_SET(z) \
194− : CC_OUT(z) (success), \
191+ : "=@ccz" (success), \
195192 [ptr] "+m" (*__ptr), \
196193 [old] "+a" (__old) \
197194 : [new] "r" (__new) \
@@ -202,8 +199,7 @@ extern void __add_wrong_size(void) · 4 unmodified lines
202199 { \
203200 volatile u64 *__ptr = (volatile u64 *)(_ptr); \
204201 asm_inline volatile(lock "cmpxchgq %[new], %[ptr]" \
205− CC_SET(z) \
206− : CC_OUT(z) (success), \
202+ : "=@ccz" (success), \
207203 [ptr] "+m" (*__ptr), \
208204 [old] "+a" (__old) \
209205 : [new] "r" (__new) \
arch/x86/include/asm/cmpxchg_32.h+2−4
@@ -46,8 +46,7 @@ static __always_inline u64 __cmpxchg64_local(volatile u64 *ptr, u64 old, u64 new · 45 unmodified lines
4646 bool ret; \
4747 \
4848 asm_inline volatile(_lock "cmpxchg8b %[ptr]" \
49− CC_SET(e) \
50− : CC_OUT(e) (ret), \
49+ : "=@ccz" (ret), \
5150 [ptr] "+m" (*(_ptr)), \
5251 "+a" (o.low), "+d" (o.high) \
5352 : "b" (n.low), "c" (n.high) \
@@ -125,8 +124,7 @@ static __always_inline u64 arch_cmpxchg64_local(volatile u64 *ptr, u64 old, u64 · 71 unmodified lines
125124 ALTERNATIVE(_lock_loc \
126125 "call cmpxchg8b_emu", \
127126 _lock "cmpxchg8b %a[ptr]", X86_FEATURE_CX8) \
128− CC_SET(e) \
129− : ALT_OUTPUT_SP(CC_OUT(e) (ret), \
127+ : ALT_OUTPUT_SP("=@ccz" (ret), \
130128 "+a" (o.low), "+d" (o.high)) \
131129 : "b" (n.low), "c" (n.high), \
132130 [ptr] "S" (_ptr) \
arch/x86/include/asm/cmpxchg_64.h+1−2
@@ -66,8 +66,7 @@ static __always_inline u128 arch_cmpxchg128_local(volatile u128 *ptr, u128 old, · 65 unmodified lines
6666 bool ret; \
6767 \
6868 asm_inline volatile(_lock "cmpxchg16b %[ptr]" \
69− CC_SET(e) \
70− : CC_OUT(e) (ret), \
69+ : "=@ccz" (ret), \
7170 [ptr] "+m" (*(_ptr)), \
7271 "+a" (o.low), "+d" (o.high) \
7372 : "b" (n.low), "c" (n.high) \
arch/x86/include/asm/mtrr.h+1−14
@@ -1,21 +1,8 @@
1+/* SPDX-License-Identifier: LGPL-2.0+ */
12 /* Generic MTRR (Memory Type Range Register) ioctls.
23
34 Copyright (C) 1997-1999 Richard Gooch
45
5− This library is free software; you can redistribute it and/or
6− modify it under the terms of the GNU Library General Public
7− License as published by the Free Software Foundation; either
8− version 2 of the License, or (at your option) any later version.
9−
10− This library is distributed in the hope that it will be useful,
11− but WITHOUT ANY WARRANTY; without even the implied warranty of
12− MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13− Library General Public License for more details.
14−
15− You should have received a copy of the GNU Library General Public
16− License along with this library; if not, write to the Free
17− Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18−
196 Richard Gooch may be reached by email at rgooch@atnf.csiro.au
207 The postal address is:
218 Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
arch/x86/include/asm/mwait.h+2−6
@@ -36,9 +36,7 @@ static __always_inline void __monitor(const void *eax, u32 ecx, u32 edx) · 35 unmodified lines
3636
3737 static __always_inline void __monitorx(const void *eax, u32 ecx, u32 edx)
3838 {
39− /* "monitorx %eax, %ecx, %edx" */
40− asm volatile(".byte 0x0f, 0x01, 0xfa"
41− :: "a" (eax), "c" (ecx), "d"(edx));
39+ asm volatile("monitorx" :: "a" (eax), "c" (ecx), "d"(edx));
4240 }
4341
4442 static __always_inline void __mwait(u32 eax, u32 ecx)
@@ -80,9 +78,7 @@ static __always_inline void __mwaitx(u32 eax, u32 ebx, u32 ecx) · 35 unmodified lines
8078 {
8179 /* No need for TSA buffer clearing on AMD */
8280
83− /* "mwaitx %eax, %ebx, %ecx" */
84− asm volatile(".byte 0x0f, 0x01, 0xfb"
85− :: "a" (eax), "b" (ebx), "c" (ecx));
81+ asm volatile("mwaitx" :: "a" (eax), "b" (ebx), "c" (ecx));
8682 }
8783
8884 /*
arch/x86/include/asm/percpu.h+4−8
@@ -309,8 +309,7 @@ do { \ · 308 unmodified lines
309309 \
310310 asm qual (__pcpu_op_##size("cmpxchg") "%[nval], " \
311311 __percpu_arg([var]) \
312− CC_SET(z) \
313− : CC_OUT(z) (success), \
312+ : "=@ccz" (success), \
314313 [oval] "+a" (pco_old__), \
315314 [var] "+m" (__my_cpu_var(_var)) \
316315 : [nval] __pcpu_reg_##size(, pco_new__) \
@@ -367,8 +366,7 @@ do { \ · 50 unmodified lines
367366 asm_inline qual ( \
368367 ALTERNATIVE("call this_cpu_cmpxchg8b_emu", \
369368 "cmpxchg8b " __percpu_arg([var]), X86_FEATURE_CX8) \
370− CC_SET(z) \
371− : ALT_OUTPUT_SP(CC_OUT(z) (success), \
369+ : ALT_OUTPUT_SP("=@ccz" (success), \
372370 [var] "+m" (__my_cpu_var(_var)), \
373371 "+a" (old__.low), "+d" (old__.high)) \
374372 : "b" (new__.low), "c" (new__.high), \
@@ -436,8 +434,7 @@ do { \ · 61 unmodified lines
436434 asm_inline qual ( \
437435 ALTERNATIVE("call this_cpu_cmpxchg16b_emu", \
438436 "cmpxchg16b " __percpu_arg([var]), X86_FEATURE_CX16) \
439− CC_SET(z) \
440− : ALT_OUTPUT_SP(CC_OUT(z) (success), \
437+ : ALT_OUTPUT_SP("=@ccz" (success), \
441438 [var] "+m" (__my_cpu_var(_var)), \
442439 "+a" (old__.low), "+d" (old__.high)) \
443440 : "b" (new__.low), "c" (new__.high), \
@@ -585,8 +582,7 @@ do { \ · 141 unmodified lines
585582 bool oldbit; \
586583 \
587584 asm volatile("btl %[nr], " __percpu_arg([var]) \
588− CC_SET(c) \
589− : CC_OUT(c) (oldbit) \
585+ : "=@ccc" (oldbit) \
590586 : [var] "m" (__my_cpu_var(_var)), \
591587 [nr] "rI" (_nr)); \
592588 oldbit; \
arch/x86/include/asm/rmwcc.h+2−24
@@ -6,37 +6,15 @@ · 5 unmodified lines
66
77 #define __CLOBBERS_MEM(clb...) "memory", ## clb
88
9−#ifndef __GCC_ASM_FLAG_OUTPUTS__
10−
11−/* Use asm goto */
12−
13−#define __GEN_RMWcc(fullop, _var, cc, clobbers, ...) \
14−({ \
15− bool c = false; \
16− asm goto (fullop "; j" #cc " %l[cc_label]" \
17− : : [var] "m" (_var), ## __VA_ARGS__ \
18− : clobbers : cc_label); \
19− if (0) { \
20−cc_label: c = true; \
21− } \
22− c; \
23−})
24−
25−#else /* defined(__GCC_ASM_FLAG_OUTPUTS__) */
26−
27−/* Use flags output or a set instruction */
28−
299 #define __GEN_RMWcc(fullop, _var, cc, clobbers, ...) \
3010 ({ \
3111 bool c; \
32− asm_inline volatile (fullop CC_SET(cc) \
33− : [var] "+m" (_var), CC_OUT(cc) (c) \
12+ asm_inline volatile (fullop \
13+ : [var] "+m" (_var), "=@cc" #cc (c) \
3414 : __VA_ARGS__ : clobbers); \
3515 c; \
3616 })
3717
38−#endif /* defined(__GCC_ASM_FLAG_OUTPUTS__) */
39−
4018 #define GEN_UNARY_RMWcc_4(op, var, cc, arg0) \
4119 __GEN_RMWcc(op " " arg0, var, cc, __CLOBBERS_MEM())
4220
arch/x86/include/asm/sev.h+1−2
@@ -491,8 +491,7 @@ static inline int pvalidate(unsigned long vaddr, bool rmp_psize, bool validate) · 490 unmodified lines
491491
492492 /* "pvalidate" mnemonic support in binutils 2.36 and newer */
493493 asm volatile(".byte 0xF2, 0x0F, 0x01, 0xFF\n\t"
494− CC_SET(c)
495− : CC_OUT(c) (no_rmpupdate), "=a"(rc)
494+ : "=@ccc"(no_rmpupdate), "=a"(rc)
496495 : "a"(vaddr), "c"(rmp_psize), "d"(validate)
497496 : "memory", "cc");
498497
arch/x86/include/asm/signal.h+1−2
@@ -83,8 +83,7 @@ static inline int __const_sigismember(sigset_t *set, int _sig) · 82 unmodified lines
8383 static inline int __gen_sigismember(sigset_t *set, int _sig)
8484 {
8585 bool ret;
86− asm("btl %2,%1" CC_SET(c)
87− : CC_OUT(c) (ret) : "m"(*set), "Ir"(_sig-1));
86+ asm("btl %2,%1" : "=@ccc"(ret) : "m"(*set), "Ir"(_sig-1));
8887 return ret;
8988 }
9089
arch/x86/include/asm/special_insns.h+3−7
@@ -75,9 +75,7 @@ static inline u32 rdpkru(void) · 74 unmodified lines
7575 * "rdpkru" instruction. Places PKRU contents in to EAX,
7676 * clears EDX and requires that ecx=0.
7777 */
78− asm volatile(".byte 0x0f,0x01,0xee\n\t"
79− : "=a" (pkru), "=d" (edx)
80− : "c" (ecx));
78+ asm volatile("rdpkru" : "=a" (pkru), "=d" (edx) : "c" (ecx));
8179 return pkru;
8280 }
8381
@@ -89,8 +87,7 @@ static inline void wrpkru(u32 pkru) · 5 unmodified lines
8987 * "wrpkru" instruction. Loads contents in EAX to PKRU,
9088 * requires that ecx = edx = 0.
9189 */
92− asm volatile(".byte 0x0f,0x01,0xef\n\t"
93− : : "a" (pkru), "c"(ecx), "d"(edx));
90+ asm volatile("wrpkru" : : "a" (pkru), "c"(ecx), "d"(edx));
9491 }
9592
9693 #else
@@ -287,8 +284,7 @@ static inline int enqcmds(void __iomem *dst, const void *src) · 190 unmodified lines
287284 * See movdir64b()'s comment on operand specification.
288285 */
289286 asm volatile(".byte 0xf3, 0x0f, 0x38, 0xf8, 0x02, 0x66, 0x90"
290− CC_SET(z)
291− : CC_OUT(z) (zf), "+m" (*__dst)
287+ : "=@ccz" (zf), "+m" (*__dst)
292288 : "m" (*__src), "a" (__dst), "d" (__src));
293289
294290 /* Submission failure is indicated via EFLAGS.ZF=1 */
arch/x86/include/asm/uaccess.h+3−4
@@ -378,7 +378,7 @@ do { \ · 377 unmodified lines
378378 asm_goto_output("\n" \
379379 "1: " LOCK_PREFIX "cmpxchg"itype" %[new], %[ptr]\n"\
380380 _ASM_EXTABLE_UA(1b, %l[label]) \
381− : CC_OUT(z) (success), \
381+ : "=@ccz" (success), \
382382 [ptr] "+m" (*_ptr), \
383383 [old] "+a" (__old) \
384384 : [new] ltype (__new) \
@@ -397,7 +397,7 @@ do { \ · 12 unmodified lines
397397 asm_goto_output("\n" \
398398 "1: " LOCK_PREFIX "cmpxchg8b %[ptr]\n" \
399399 _ASM_EXTABLE_UA(1b, %l[label]) \
400− : CC_OUT(z) (success), \
400+ : "=@ccz" (success), \
401401 "+A" (__old), \
402402 [ptr] "+m" (*_ptr) \
403403 : "b" ((u32)__new), \
@@ -417,11 +417,10 @@ do { \ · 13 unmodified lines
417417 __typeof__(*(_ptr)) __new = (_new); \
418418 asm volatile("\n" \
419419 "1: " LOCK_PREFIX "cmpxchg"itype" %[new], %[ptr]\n"\
420− CC_SET(z) \
421420 "2:\n" \
422421 _ASM_EXTABLE_TYPE_REG(1b, 2b, EX_TYPE_EFAULT_REG, \
423422 %[errout]) \
424− : CC_OUT(z) (success), \
423+ : "=@ccz" (success), \
425424 [errout] "+r" (__err), \
426425 [ptr] "+m" (*_ptr), \
427426 [old] "+a" (__old) \
arch/x86/kernel/cpu/mtrr/cleanup.c+1−14
@@ -1,21 +1,8 @@
1+// SPDX-License-Identifier: LGPL-2.0+
12 /*
23 * MTRR (Memory Type Range Register) cleanup
34 *
45 * Copyright (C) 2009 Yinghai Lu
5− *
6− * This library is free software; you can redistribute it and/or
7− * modify it under the terms of the GNU Library General Public
8− * License as published by the Free Software Foundation; either
9− * version 2 of the License, or (at your option) any later version.
10− *
11− * This library is distributed in the hope that it will be useful,
12− * but WITHOUT ANY WARRANTY; without even the implied warranty of
13− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14− * Library General Public License for more details.
15− *
16− * You should have received a copy of the GNU Library General Public
17− * License along with this library; if not, write to the Free
18− * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
196 */
207 #include <linux/init.h>
218 #include <linux/pci.h>
arch/x86/kernel/cpu/mtrr/mtrr.c+1−14
@@ -1,22 +1,9 @@
1+// SPDX-License-Identifier: LGPL-2.0+
12 /* Generic MTRR (Memory Type Range Register) driver.
23
34 Copyright (C) 1997-2000 Richard Gooch
45 Copyright (c) 2002 Patrick Mochel
56
6− This library is free software; you can redistribute it and/or
7− modify it under the terms of the GNU Library General Public
8− License as published by the Free Software Foundation; either
9− version 2 of the License, or (at your option) any later version.
10−
11− This library is distributed in the hope that it will be useful,
12− but WITHOUT ANY WARRANTY; without even the implied warranty of
13− MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14− Library General Public License for more details.
15−
16− You should have received a copy of the GNU Library General Public
17− License along with this library; if not, write to the Free
18− Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19−
207 Richard Gooch may be reached by email at rgooch@atnf.csiro.au
218 The postal address is:
229 Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
arch/x86/kernel/cpu/sgx/encls.h+3−3
@@ -68,7 +68,7 @@ static inline bool encls_failed(int ret) · 67 unmodified lines
6868 ({ \
6969 int ret; \
7070 asm volatile( \
71− "1: .byte 0x0f, 0x01, 0xcf;\n\t" \
71+ "1: encls\n" \
7272 "2:\n" \
7373 _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_FAULT_SGX) \
7474 : "=a"(ret) \
@@ -111,8 +111,8 @@ static inline bool encls_failed(int ret) · 36 unmodified lines
111111 ({ \
112112 int ret; \
113113 asm volatile( \
114− "1: .byte 0x0f, 0x01, 0xcf;\n\t" \
115− " xor %%eax,%%eax;\n" \
114+ "1: encls\n\t" \
115+ "xor %%eax,%%eax\n" \
116116 "2:\n" \
117117 _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_FAULT_SGX) \
118118 : "=a"(ret), "=b"(rbx_out) \
tools/arch/x86/include/asm/asm.h+0−12
@@ -108,18 +108,6 @@ · 107 unmodified lines
108108
109109 #endif
110110
111−/*
112− * Macros to generate condition code outputs from inline assembly,
113− * The output operand must be type "bool".
114− */
115−#ifdef __GCC_ASM_FLAG_OUTPUTS__
116−# define CC_SET(c) "\n\t/* output condition code " #c "*/\n"
117−# define CC_OUT(c) "=@cc" #c
118−#else
119−# define CC_SET(c) "\n\tset" #c " %[_cc_" #c "]\n"
120−# define CC_OUT(c) [_cc_ ## c] "=qm"
121−#endif
122−
123111 #ifdef __KERNEL__
124112
125113 /* Exception table entry */
tools/perf/bench/find-bit-bench.c+1−1
@@ -37,7 +37,7 @@ static noinline void workload(int val) · 36 unmodified lines
3737 accumulator++;
3838 }
3939
40−#if (defined(__i386__) || defined(__x86_64__)) && defined(__GCC_ASM_FLAG_OUTPUTS__)
40+#if defined(__i386__) || defined(__x86_64__)
4141 static bool asm_test_bit(long nr, const unsigned long *addr)
4242 {
4343 bool oldbit;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t