Message ID | 20240618042750.485720-8-pavitrakumarm@vayavyalabs.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Herbert Xu |
Headers | show |
Series | Add SPAcc Crypto Driver Support | expand |
Hi Pavitrakumar, kernel test robot noticed the following build errors: [auto build test ERROR on 1dcf865d3bf5bff45e93cb2410911b3428dacb78] url: https://github.com/intel-lab-lkp/linux/commits/Pavitrakumar-M/Add-SPAcc-Skcipher-support/20240618-123149 base: 1dcf865d3bf5bff45e93cb2410911b3428dacb78 patch link: https://lore.kernel.org/r/20240618042750.485720-8-pavitrakumarm%40vayavyalabs.com patch subject: [PATCH v4 7/7] Enable Driver compilation in crypto Kconfig and Makefile config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240619/202406190117.ogrwpVBI-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 78ee473784e5ef6f0b19ce4cb111fb6e4d23c6b2) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240619/202406190117.ogrwpVBI-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/202406190117.ogrwpVBI-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/crypto/dwc-spacc/spacc_core.c:6: In file included from include/linux/interrupt.h:21: In file included from arch/riscv/include/asm/sections.h:9: In file included from include/linux/mm.h:2253: include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> drivers/crypto/dwc-spacc/spacc_core.c:998:2: error: call to '__compiletime_assert_287' declared with 'error' attribute: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_DEBUG_SG) 998 | BUILD_BUG_ON(IS_ENABLED(CONFIG_DEBUG_SG)); | ^ include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^ include/linux/compiler_types.h:487:2: note: expanded from macro 'compiletime_assert' 487 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:475:2: note: expanded from macro '_compiletime_assert' 475 | __compiletime_assert(condition, msg, prefix, suffix) | ^ include/linux/compiler_types.h:468:4: note: expanded from macro '__compiletime_assert' 468 | prefix ## suffix(); \ | ^ <scratch space>:90:1: note: expanded from here 90 | __compiletime_assert_287 | ^ >> drivers/crypto/dwc-spacc/spacc_core.c:998:2: error: call to '__compiletime_assert_287' declared with 'error' attribute: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_DEBUG_SG) include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^ include/linux/compiler_types.h:487:2: note: expanded from macro 'compiletime_assert' 487 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:475:2: note: expanded from macro '_compiletime_assert' 475 | __compiletime_assert(condition, msg, prefix, suffix) | ^ include/linux/compiler_types.h:468:4: note: expanded from macro '__compiletime_assert' 468 | prefix ## suffix(); \ | ^ <scratch space>:90:1: note: expanded from here 90 | __compiletime_assert_287 | ^ 1 warning and 2 errors generated. vim +998 drivers/crypto/dwc-spacc/spacc_core.c 53fcef670e7764 Pavitrakumar M 2024-06-18 984 7b7fdb79292ddd Pavitrakumar M 2024-06-18 985 /* 7b7fdb79292ddd Pavitrakumar M 2024-06-18 986 * This hack implements SG chaining in a way that works around some 7b7fdb79292ddd Pavitrakumar M 2024-06-18 987 * limitations of Linux -- the generic sg_chain function fails on ARM, and 7b7fdb79292ddd Pavitrakumar M 2024-06-18 988 * the scatterwalk_sg_chain function creates chains that cannot be DMA mapped 7b7fdb79292ddd Pavitrakumar M 2024-06-18 989 * on x86. So this one is halfway inbetween, and hopefully works in both 7b7fdb79292ddd Pavitrakumar M 2024-06-18 990 * environments. 7b7fdb79292ddd Pavitrakumar M 2024-06-18 991 * 7b7fdb79292ddd Pavitrakumar M 2024-06-18 992 * Unfortunately, if SG debugging is enabled the scatterwalk code will bail 7b7fdb79292ddd Pavitrakumar M 2024-06-18 993 * on these chains, but it will otherwise work properly. 7b7fdb79292ddd Pavitrakumar M 2024-06-18 994 */ 7b7fdb79292ddd Pavitrakumar M 2024-06-18 995 static inline void spacc_sg_chain(struct scatterlist *sg1, int num, 7b7fdb79292ddd Pavitrakumar M 2024-06-18 996 struct scatterlist *sg2) 7b7fdb79292ddd Pavitrakumar M 2024-06-18 997 { 7b7fdb79292ddd Pavitrakumar M 2024-06-18 @998 BUILD_BUG_ON(IS_ENABLED(CONFIG_DEBUG_SG)); 7b7fdb79292ddd Pavitrakumar M 2024-06-18 999 sg_chain(sg1, num, sg2); 7b7fdb79292ddd Pavitrakumar M 2024-06-18 1000 sg1[num - 1].page_link |= 1; 7b7fdb79292ddd Pavitrakumar M 2024-06-18 1001 } 7b7fdb79292ddd Pavitrakumar M 2024-06-18 1002
Hi Pavitrakumar, kernel test robot noticed the following build errors: [auto build test ERROR on 1dcf865d3bf5bff45e93cb2410911b3428dacb78] url: https://github.com/intel-lab-lkp/linux/commits/Pavitrakumar-M/Add-SPAcc-Skcipher-support/20240618-123149 base: 1dcf865d3bf5bff45e93cb2410911b3428dacb78 patch link: https://lore.kernel.org/r/20240618042750.485720-8-pavitrakumarm%40vayavyalabs.com patch subject: [PATCH v4 7/7] Enable Driver compilation in crypto Kconfig and Makefile config: arc-randconfig-001-20240619 (https://download.01.org/0day-ci/archive/20240619/202406190133.NR6c5fKB-lkp@intel.com/config) compiler: arc-elf-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240619/202406190133.NR6c5fKB-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/202406190133.NR6c5fKB-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from <command-line>: In function 'spacc_sg_chain', inlined from 'fixup_sg' at drivers/crypto/dwc-spacc/spacc_core.c:1030:4, inlined from 'spacc_sgs_to_ddt' at drivers/crypto/dwc-spacc/spacc_core.c:1059:16: >> include/linux/compiler_types.h:487:45: error: call to '__compiletime_assert_234' declared with attribute error: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_DEBUG_SG) 487 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:468:25: note: in definition of macro '__compiletime_assert' 468 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:487:9: note: in expansion of macro '_compiletime_assert' 487 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^~~~~~~~~~~~~~~~ drivers/crypto/dwc-spacc/spacc_core.c:998:9: note: in expansion of macro 'BUILD_BUG_ON' 998 | BUILD_BUG_ON(IS_ENABLED(CONFIG_DEBUG_SG)); | ^~~~~~~~~~~~ In function 'spacc_sg_chain', inlined from 'fixup_sg' at drivers/crypto/dwc-spacc/spacc_core.c:1030:4, inlined from 'spacc_sg_to_ddt' at drivers/crypto/dwc-spacc/spacc_core.c:1109:15: >> include/linux/compiler_types.h:487:45: error: call to '__compiletime_assert_234' declared with attribute error: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_DEBUG_SG) 487 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:468:25: note: in definition of macro '__compiletime_assert' 468 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:487:9: note: in expansion of macro '_compiletime_assert' 487 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^~~~~~~~~~~~~~~~ drivers/crypto/dwc-spacc/spacc_core.c:998:9: note: in expansion of macro 'BUILD_BUG_ON' 998 | BUILD_BUG_ON(IS_ENABLED(CONFIG_DEBUG_SG)); | ^~~~~~~~~~~~ vim +/__compiletime_assert_234 +487 include/linux/compiler_types.h eb5c2d4b45e3d2 Will Deacon 2020-07-21 473 eb5c2d4b45e3d2 Will Deacon 2020-07-21 474 #define _compiletime_assert(condition, msg, prefix, suffix) \ eb5c2d4b45e3d2 Will Deacon 2020-07-21 475 __compiletime_assert(condition, msg, prefix, suffix) eb5c2d4b45e3d2 Will Deacon 2020-07-21 476 eb5c2d4b45e3d2 Will Deacon 2020-07-21 477 /** eb5c2d4b45e3d2 Will Deacon 2020-07-21 478 * compiletime_assert - break build and emit msg if condition is false eb5c2d4b45e3d2 Will Deacon 2020-07-21 479 * @condition: a compile-time constant condition to check eb5c2d4b45e3d2 Will Deacon 2020-07-21 480 * @msg: a message to emit if condition is false eb5c2d4b45e3d2 Will Deacon 2020-07-21 481 * eb5c2d4b45e3d2 Will Deacon 2020-07-21 482 * In tradition of POSIX assert, this macro will break the build if the eb5c2d4b45e3d2 Will Deacon 2020-07-21 483 * supplied condition is *false*, emitting the supplied error message if the eb5c2d4b45e3d2 Will Deacon 2020-07-21 484 * compiler has support to do so. eb5c2d4b45e3d2 Will Deacon 2020-07-21 485 */ eb5c2d4b45e3d2 Will Deacon 2020-07-21 486 #define compiletime_assert(condition, msg) \ eb5c2d4b45e3d2 Will Deacon 2020-07-21 @487 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) eb5c2d4b45e3d2 Will Deacon 2020-07-21 488
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 94f23c6fc93b..009cbd0e1993 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -696,6 +696,7 @@ config CRYPTO_DEV_BCM_SPU ahash, and aead algorithms with the kernel cryptographic API. source "drivers/crypto/stm32/Kconfig" +source "drivers/crypto/dwc-spacc/Kconfig" config CRYPTO_DEV_SAFEXCEL tristate "Inside Secure's SafeXcel cryptographic engine driver" diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile index ad4ccef67d12..a937e8f5849b 100644 --- a/drivers/crypto/Makefile +++ b/drivers/crypto/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_CRYPTO_DEV_BCM_SPU) += bcm/ obj-$(CONFIG_CRYPTO_DEV_SAFEXCEL) += inside-secure/ obj-$(CONFIG_CRYPTO_DEV_ARTPEC6) += axis/ obj-y += xilinx/ +obj-y += dwc-spacc/ obj-y += hisilicon/ obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic/ obj-y += intel/