From: kernel test robot <lkp@intel.com>
To: Eric Biggers <ebiggers@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [ebiggers:wip-crypto 9/12] arch/x86/crypto/sm4_aesni_avx2_glue.c:110:7: error: call to undeclared function 'cpu_has_xfeatures'; ISO C99 and later do not support implicit function declarations
Date: Mon, 31 Mar 2025 05:40:44 +0800 [thread overview]
Message-ID: <202503310513.JIGyzevF-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git wip-crypto
head: 5e0c73a309dc89400fca72e888f4879582465293
commit: 761d601c8ce5b23a4c90843f7d2ce55f75302516 [9/12] crypto: x86/sm4 - stop using the SIMD helper
config: x86_64-buildonly-randconfig-001-20250331 (https://download.01.org/0day-ci/archive/20250331/202503310513.JIGyzevF-lkp@intel.com/config)
compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250331/202503310513.JIGyzevF-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503310513.JIGyzevF-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/crypto/sm4_aesni_avx2_glue.c:110:7: error: call to undeclared function 'cpu_has_xfeatures'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
110 | if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
| ^
1 error generated.
--
>> arch/x86/crypto/sm4_aesni_avx_glue.c:49:3: error: call to undeclared function 'kernel_fpu_begin'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
49 | kernel_fpu_begin();
| ^
>> arch/x86/crypto/sm4_aesni_avx_glue.c:63:3: error: call to undeclared function 'kernel_fpu_end'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
63 | kernel_fpu_end();
| ^
arch/x86/crypto/sm4_aesni_avx_glue.c:137:3: error: call to undeclared function 'kernel_fpu_begin'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
137 | kernel_fpu_begin();
| ^
arch/x86/crypto/sm4_aesni_avx_glue.c:173:3: error: call to undeclared function 'kernel_fpu_end'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
173 | kernel_fpu_end();
| ^
arch/x86/crypto/sm4_aesni_avx_glue.c:202:3: error: call to undeclared function 'kernel_fpu_begin'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
202 | kernel_fpu_begin();
| ^
arch/x86/crypto/sm4_aesni_avx_glue.c:231:3: error: call to undeclared function 'kernel_fpu_end'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
231 | kernel_fpu_end();
| ^
>> arch/x86/crypto/sm4_aesni_avx_glue.c:324:7: error: call to undeclared function 'cpu_has_xfeatures'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
324 | if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
| ^
7 errors generated.
vim +/cpu_has_xfeatures +110 arch/x86/crypto/sm4_aesni_avx2_glue.c
5b2efa2bb865eb Tianjia Zhang 2021-08-18 97
5b2efa2bb865eb Tianjia Zhang 2021-08-18 98 static int __init sm4_init(void)
5b2efa2bb865eb Tianjia Zhang 2021-08-18 99 {
5b2efa2bb865eb Tianjia Zhang 2021-08-18 100 const char *feature_name;
5b2efa2bb865eb Tianjia Zhang 2021-08-18 101
5b2efa2bb865eb Tianjia Zhang 2021-08-18 102 if (!boot_cpu_has(X86_FEATURE_AVX) ||
5b2efa2bb865eb Tianjia Zhang 2021-08-18 103 !boot_cpu_has(X86_FEATURE_AVX2) ||
5b2efa2bb865eb Tianjia Zhang 2021-08-18 104 !boot_cpu_has(X86_FEATURE_AES) ||
5b2efa2bb865eb Tianjia Zhang 2021-08-18 105 !boot_cpu_has(X86_FEATURE_OSXSAVE)) {
5b2efa2bb865eb Tianjia Zhang 2021-08-18 106 pr_info("AVX2 or AES-NI instructions are not detected.\n");
5b2efa2bb865eb Tianjia Zhang 2021-08-18 107 return -ENODEV;
5b2efa2bb865eb Tianjia Zhang 2021-08-18 108 }
5b2efa2bb865eb Tianjia Zhang 2021-08-18 109
5b2efa2bb865eb Tianjia Zhang 2021-08-18 @110 if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
5b2efa2bb865eb Tianjia Zhang 2021-08-18 111 &feature_name)) {
5b2efa2bb865eb Tianjia Zhang 2021-08-18 112 pr_info("CPU feature '%s' is not supported.\n", feature_name);
5b2efa2bb865eb Tianjia Zhang 2021-08-18 113 return -ENODEV;
5b2efa2bb865eb Tianjia Zhang 2021-08-18 114 }
5b2efa2bb865eb Tianjia Zhang 2021-08-18 115
761d601c8ce5b2 Eric Biggers 2025-03-30 116 return crypto_register_skciphers(sm4_aesni_avx2_skciphers,
761d601c8ce5b2 Eric Biggers 2025-03-30 117 ARRAY_SIZE(sm4_aesni_avx2_skciphers));
5b2efa2bb865eb Tianjia Zhang 2021-08-18 118 }
5b2efa2bb865eb Tianjia Zhang 2021-08-18 119
:::::: The code at line 110 was first introduced by commit
:::::: 5b2efa2bb865eb784e06987c7ce98c3c835b495b crypto: x86/sm4 - add AES-NI/AVX2/x86_64 implementation
:::::: TO: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
:::::: CC: Herbert Xu <herbert@gondor.apana.org.au>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-03-30 21:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202503310513.JIGyzevF-lkp@intel.com \
--to=lkp@intel.com \
--cc=ebiggers@google.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox