mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 43 participants
  • 18661 discussions
[openeuler:OLK-5.10 2882/2882] ld.lld: error: undefined symbol: sk_msg_alloc
by kernel test robot 02 May '25

02 May '25
Hi Wei, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 46abe407b020831448331eea487e07c883e95836 commit: e9ce37bbceb2779c0015fcac54cc8df7a2ec8b76 [2882/2882] tcp_comp: implement sendmsg for tcp compression config: x86_64-randconfig-102-20250502 (https://download.01.org/0day-ci/archive/20250502/202505021845.WkxnVSOV-lkp@…) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250502/202505021845.WkxnVSOV-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505021845.WkxnVSOV-lkp@intel.com/ All errors (new ones prefixed by >>): >> ld.lld: error: undefined symbol: sk_msg_alloc >>> referenced by tcp_comp.c:148 (net/ipv4/tcp_comp.c:148) >>> ipv4/tcp_comp.o:(tcp_comp_sendmsg) in archive net/built-in.a -- >> ld.lld: error: undefined symbol: sk_msg_trim >>> referenced by tcp_comp.c:236 (net/ipv4/tcp_comp.c:236) >>> ipv4/tcp_comp.o:(tcp_comp_sendmsg) in archive net/built-in.a -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2882/2882] drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_monitor.o: warning: objtool: sxevf_work_cb()+0x108b: can't find switch jump table
by kernel test robot 02 May '25

02 May '25
Hi liujie_answer, First bad commit (maybe != root cause): tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 46abe407b020831448331eea487e07c883e95836 commit: 8cee206b5558245197158bd20895f95cc28d8468 [2882/2882] Ethernet: Linkdata: Supports Linkdata ethernet Controllers config: x86_64-randconfig-101-20250502 (https://download.01.org/0day-ci/archive/20250502/202505021622.Vo53IuHc-lkp@…) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250502/202505021622.Vo53IuHc-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505021622.Vo53IuHc-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_monitor.o: warning: objtool: sxevf_work_cb()+0x108b: can't find switch jump table Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_KEY_PARSER Depends on [m]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] && ASYMMETRIC_PUBLIC_KEY_SUBTYPE [=m] Selected by [y]: - PGP_PRELOAD [=y] && CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2195/2195] include/linux/pgplib.h:36:23: error: field has incomplete type 'enum pgp_key_version'
by kernel test robot 02 May '25

02 May '25
Hi David, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 241523b7d82e629fd115303840c385702bf2ea5e commit: 43d4042e06d2bf96adf67d25e8d91653507a4cf9 [2195/2195] KEYS: Provide a function to load keys from a PGP keyring blob config: x86_64-randconfig-101-20250502 (https://download.01.org/0day-ci/archive/20250502/202505021617.FheAIoZW-lkp@…) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250502/202505021617.FheAIoZW-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505021617.FheAIoZW-lkp@intel.com/ All error/warnings (new ones prefixed by >>): In file included from crypto/asymmetric_keys/pgp_preload.c:19: >> include/linux/pgplib.h:26:15: warning: declaration of 'enum pgp_packet_tag' will not be visible outside of this function [-Wvisibility] 26 | enum pgp_packet_tag type, | ^ >> include/linux/pgplib.h:36:23: error: field has incomplete type 'enum pgp_key_version' 36 | enum pgp_key_version version : 8; | ^ include/linux/pgplib.h:36:7: note: forward declaration of 'enum pgp_key_version' 36 | enum pgp_key_version version : 8; | ^ >> include/linux/pgplib.h:37:23: error: field has incomplete type 'enum pgp_pubkey_algo' 37 | enum pgp_pubkey_algo pubkey_algo : 8; | ^ include/linux/pgplib.h:37:7: note: forward declaration of 'enum pgp_pubkey_algo' 37 | enum pgp_pubkey_algo pubkey_algo : 8; | ^ >> crypto/asymmetric_keys/pgp_preload.c:63:10: warning: declaration of 'enum pgp_packet_tag' will not be visible outside of this function [-Wvisibility] 63 | enum pgp_packet_tag type, u8 headerlen, | ^ >> crypto/asymmetric_keys/pgp_preload.c:63:25: error: variable has incomplete type 'enum pgp_packet_tag' 63 | enum pgp_packet_tag type, u8 headerlen, | ^ crypto/asymmetric_keys/pgp_preload.c:63:10: note: forward declaration of 'enum pgp_packet_tag' 63 | enum pgp_packet_tag type, u8 headerlen, | ^ >> crypto/asymmetric_keys/pgp_preload.c:107:36: error: use of undeclared identifier 'PGP_PKT_PUBLIC_KEY' 107 | ctx.pgp.types_of_interest = (1 << PGP_PKT_PUBLIC_KEY); | ^ >> crypto/asymmetric_keys/pgp_preload.c:108:25: error: incompatible function pointer types assigning to 'int (*)(struct pgp_parse_context *, enum pgp_packet_tag, u8, const u8 *, size_t)' (aka 'int (*)(struct pgp_parse_context *, enum pgp_packet_tag, unsigned char, const unsigned char *, unsigned long)') from 'int (struct pgp_parse_context *, enum pgp_packet_tag, u8, const u8 *, size_t)' (aka 'int (struct pgp_parse_context *, enum pgp_packet_tag, unsigned char, const unsigned char *, unsigned long)') [-Wincompatible-function-pointer-types] 108 | ctx.pgp.process_packet = found_pgp_key; | ^ ~~~~~~~~~~~~~ >> crypto/asymmetric_keys/pgp_preload.c:101:12: warning: no previous prototype for function 'preload_pgp_keys' [-Wmissing-prototypes] 101 | int __init preload_pgp_keys(const u8 *pgpdata, size_t pgpdatalen, | ^ crypto/asymmetric_keys/pgp_preload.c:101:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 101 | int __init preload_pgp_keys(const u8 *pgpdata, size_t pgpdatalen, | ^ | static 3 warnings and 5 errors generated. -- In file included from crypto/asymmetric_keys/pgp_public_key.c:19: In file included from include/linux/mpi.h:21: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:2193: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from crypto/asymmetric_keys/pgp_public_key.c:20: >> include/linux/pgplib.h:26:15: warning: declaration of 'enum pgp_packet_tag' will not be visible outside of this function [-Wvisibility] 26 | enum pgp_packet_tag type, | ^ >> include/linux/pgplib.h:36:23: error: field has incomplete type 'enum pgp_key_version' 36 | enum pgp_key_version version : 8; | ^ include/linux/pgplib.h:36:7: note: forward declaration of 'enum pgp_key_version' 36 | enum pgp_key_version version : 8; | ^ >> include/linux/pgplib.h:37:23: error: field has incomplete type 'enum pgp_pubkey_algo' 37 | enum pgp_pubkey_algo pubkey_algo : 8; | ^ include/linux/pgplib.h:37:7: note: forward declaration of 'enum pgp_pubkey_algo' 37 | enum pgp_pubkey_algo pubkey_algo : 8; | ^ >> crypto/asymmetric_keys/pgp_public_key.c:63:2: error: call to undeclared function 'kenter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 63 | kenter(""); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:65:22: error: use of undeclared identifier 'PGP_KEY_VERSION_4' 65 | n = (pgp->version < PGP_KEY_VERSION_4) ? 8 : 6; | ^ >> crypto/asymmetric_keys/pgp_public_key.c:67:9: error: call to undeclared function 'mpi_key_length'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 67 | ret = mpi_key_length(key_ptr, keylen, nb + i, nn + i); | ^ crypto/asymmetric_keys/pgp_public_key.c:95:21: error: use of undeclared identifier 'PGP_KEY_VERSION_4' 95 | if (pgp->version < PGP_KEY_VERSION_4) { | ^ >> crypto/asymmetric_keys/pgp_public_key.c:115:2: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 115 | kleave(" = %d", ret); | ^ crypto/asymmetric_keys/pgp_public_key.c:134:42: error: use of undeclared identifier 'PGP_KEY_VERSION_4' 134 | tfm = crypto_alloc_shash(pgp->version < PGP_KEY_VERSION_4 ? | ^ crypto/asymmetric_keys/pgp_public_key.c:191:2: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 191 | kleave(" = %d", ret); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:199:12: warning: declaration of 'enum pgp_packet_tag' will not be visible outside of this function [-Wvisibility] 199 | enum pgp_packet_tag type, | ^ >> crypto/asymmetric_keys/pgp_public_key.c:199:27: error: variable has incomplete type 'enum pgp_packet_tag' 199 | enum pgp_packet_tag type, | ^ crypto/asymmetric_keys/pgp_public_key.c:199:12: note: forward declaration of 'enum pgp_packet_tag' 199 | enum pgp_packet_tag type, | ^ crypto/asymmetric_keys/pgp_public_key.c:211:2: error: call to undeclared function 'kenter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 211 | kenter(",%u,%u,,%zu", type, headerlen, datalen); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:213:14: error: use of undeclared identifier 'PGP_PKT_USER_ID' 213 | if (type == PGP_PKT_USER_ID) { | ^ crypto/asymmetric_keys/pgp_public_key.c:216:3: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 216 | kleave(" = 0 [user ID]"); | ^ crypto/asymmetric_keys/pgp_public_key.c:221:3: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 221 | kleave(" = -ENOKEY [already]"); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:234:25: error: use of undeclared identifier 'PGP_PUBKEY__LAST' 234 | if (pgp.pubkey_algo >= PGP_PUBKEY__LAST) | ^ >> crypto/asymmetric_keys/pgp_public_key.c:236:9: error: use of undeclared identifier 'pgp_to_public_key_algo' 236 | algo = pgp_to_public_key_algo[pgp.pubkey_algo]; | ^ crypto/asymmetric_keys/pgp_public_key.c:252:2: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 252 | kleave(" = 0 [use]"); | ^ crypto/asymmetric_keys/pgp_public_key.c:310:2: error: call to undeclared function 'kenter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 310 | kenter(""); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:313:36: error: use of undeclared identifier 'PGP_PKT_PUBLIC_KEY' 313 | ctx.pgp.types_of_interest = (1 << PGP_PKT_PUBLIC_KEY) | | ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 3 warnings and 20 errors generated. Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_KEY_PARSER Depends on [m]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] && ASYMMETRIC_PUBLIC_KEY_SUBTYPE [=m] Selected by [y]: - PGP_PRELOAD [=y] && CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] vim +36 include/linux/pgplib.h b78af6579e15dc David Howells 2023-09-12 19 b78af6579e15dc David Howells 2023-09-12 20 /* b78af6579e15dc David Howells 2023-09-12 21 * PGP library packet parser b78af6579e15dc David Howells 2023-09-12 22 */ b78af6579e15dc David Howells 2023-09-12 23 struct pgp_parse_context { b78af6579e15dc David Howells 2023-09-12 24 u64 types_of_interest; b78af6579e15dc David Howells 2023-09-12 25 int (*process_packet)(struct pgp_parse_context *context, b78af6579e15dc David Howells 2023-09-12 @26 enum pgp_packet_tag type, b78af6579e15dc David Howells 2023-09-12 27 u8 headerlen, b78af6579e15dc David Howells 2023-09-12 28 const u8 *data, b78af6579e15dc David Howells 2023-09-12 29 size_t datalen); b78af6579e15dc David Howells 2023-09-12 30 }; b78af6579e15dc David Howells 2023-09-12 31 b78af6579e15dc David Howells 2023-09-12 32 extern int pgp_parse_packets(const u8 *data, size_t datalen, b78af6579e15dc David Howells 2023-09-12 33 struct pgp_parse_context *ctx); b78af6579e15dc David Howells 2023-09-12 34 b78af6579e15dc David Howells 2023-09-12 35 struct pgp_parse_pubkey { b78af6579e15dc David Howells 2023-09-12 @36 enum pgp_key_version version : 8; b78af6579e15dc David Howells 2023-09-12 @37 enum pgp_pubkey_algo pubkey_algo : 8; b78af6579e15dc David Howells 2023-09-12 38 __kernel_old_time_t creation_time; b78af6579e15dc David Howells 2023-09-12 39 __kernel_old_time_t expires_at; b78af6579e15dc David Howells 2023-09-12 40 }; b78af6579e15dc David Howells 2023-09-12 41 :::::: The code at line 36 was first introduced by commit :::::: b78af6579e15dcdff86504da90af77f3e890270e PGPLIB: Basic packet parser :::::: TO: David Howells <dhowells(a)redhat.com> :::::: CC: zgzxx <zhangguangzhi3(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2882/2882] drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:134:36: sparse: sparse: invalid assignment: |=
by kernel test robot 02 May '25

02 May '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 46abe407b020831448331eea487e07c883e95836 commit: 8cee206b5558245197158bd20895f95cc28d8468 [2882/2882] Ethernet: Linkdata: Supports Linkdata ethernet Controllers config: x86_64-randconfig-122-20250502 (https://download.01.org/0day-ci/archive/20250502/202505021153.ilI6N3GY-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250502/202505021153.ilI6N3GY-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505021153.ilI6N3GY-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/net/ethernet/linkdata/sxe/sxepf/sxe_csum.c: note: in included file: >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:134:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:134:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:134:36: sparse: right side has type unsigned int drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:115:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:115:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:115:36: sparse: right side has type unsigned int drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:121:36: sparse: sparse: invalid assignment: &= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:121:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:121:36: sparse: right side has type int drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:122:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:122:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:122:36: sparse: right side has type unsigned int -- >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_host_cli.c:174:30: sparse: sparse: symbol 'sxe_cdev_fops' was not declared. Should it be static? -- >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_host_hdc.c:42:1: sparse: sparse: symbol 'g_hdc_sema' was not declared. Should it be static? -- >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.c:505:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.c:505:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.c:505:36: sparse: right side has type int >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.c:507:41: sparse: sparse: cast from restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.c:508:32: sparse: sparse: cast from restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.c:509:41: sparse: sparse: cast from restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.c:510:39: sparse: sparse: cast from restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.c: note: in included file: drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:115:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:115:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:115:36: sparse: right side has type unsigned int drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:121:36: sparse: sparse: invalid assignment: &= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:121:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:121:36: sparse: right side has type int drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:122:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:122:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:122:36: sparse: right side has type unsigned int >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:134:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:134:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:134:36: sparse: right side has type unsigned int >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:147:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] mss_l4len_idx @@ got unsigned int [usertype] mss_l4len @@ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:147:34: sparse: expected restricted __le32 [usertype] mss_l4len_idx drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:147:34: sparse: got unsigned int [usertype] mss_l4len drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:128:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:128:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:128:36: sparse: right side has type unsigned int drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:121:36: sparse: sparse: invalid assignment: &= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:121:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:121:36: sparse: right side has type int drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:122:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:122:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h:122:36: sparse: right side has type unsigned int -- drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_csum.c: note: in included file: >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:103:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:103:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:103:36: sparse: right side has type unsigned int drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:77:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:77:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:77:36: sparse: right side has type unsigned int drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:83:36: sparse: sparse: invalid assignment: &= drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:83:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:83:36: sparse: right side has type int drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:84:36: sparse: sparse: invalid assignment: |= drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:84:36: sparse: left side has type restricted __le32 drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_tx_proc.h:84:36: sparse: right side has type unsigned int vim +134 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_tx_proc.h 130 131 static inline void 132 sxe_ctxt_desc_tucmd_set(struct sxe_tx_context_desc *ctxt_desc, u32 tucmd) 133 { > 134 ctxt_desc->type_tucmd_mlhl |= tucmd; 135 } 136 137 static inline void 138 sxe_ctxt_desc_sa_idx_set(struct sxe_tx_context_desc *ctxt_desc, u32 sa_idx) 139 { 140 ctxt_desc->sa_idx = sa_idx; 141 } 142 143 static inline void 144 sxe_ctxt_desc_mss_l4len_set(struct sxe_tx_context_desc *ctxt_desc, 145 u32 mss_l4len) 146 { > 147 ctxt_desc->mss_l4len_idx = mss_l4len; 148 } 149 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2882/2882] drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c:32:19: sparse: sparse: symbol 'g_netdev' was not declared. Should it be static?
by kernel test robot 02 May '25

02 May '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 46abe407b020831448331eea487e07c883e95836 commit: 8cee206b5558245197158bd20895f95cc28d8468 [2882/2882] Ethernet: Linkdata: Supports Linkdata ethernet Controllers config: x86_64-randconfig-123-20250502 (https://download.01.org/0day-ci/archive/20250502/202505021040.redoLH7C-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250502/202505021040.redoLH7C-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505021040.redoLH7C-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c:32:19: sparse: sparse: symbol 'g_netdev' was not declared. Should it be static? >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c:262:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void const *reg @@ drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c:262:22: sparse: expected void const volatile [noderef] __iomem *addr drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c:262:22: sparse: got void const *reg >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c:267:23: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *reg @@ drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c:267:23: sparse: expected void volatile [noderef] __iomem *addr drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c:267:23: sparse: got void *reg vim +/g_netdev +32 drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c 30 31 static struct workqueue_struct *sxevf_wq; > 32 struct net_device *g_netdev; 33 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2882/2882] drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c:1071:12: error: 'sxe_resume' defined but not used
by kernel test robot 02 May '25

02 May '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 46abe407b020831448331eea487e07c883e95836 commit: 8cee206b5558245197158bd20895f95cc28d8468 [2882/2882] Ethernet: Linkdata: Supports Linkdata ethernet Controllers config: x86_64-randconfig-122-20250502 (https://download.01.org/0day-ci/archive/20250502/202505020850.kZitpRTl-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250502/202505020850.kZitpRTl-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505020850.kZitpRTl-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c:70:6: error: no previous prototype for 'sxe_allow_inval_mac' [-Werror=missing-prototypes] 70 | bool sxe_allow_inval_mac(void) | ^~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c:1071:12: error: 'sxe_resume' defined but not used [-Werror=unused-function] 1071 | static int sxe_resume(struct device *dev) | ^~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c:1038:12: error: 'sxe_suspend' defined but not used [-Werror=unused-function] 1038 | static int sxe_suspend(struct device *dev) | ^~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c:543:12: error: 'sxevf_resume' defined but not used [-Werror=unused-function] 543 | static s32 sxevf_resume(struct device *dev) | ^~~~~~~~~~~~ cc1: all warnings being treated as errors vim +/sxe_resume +1071 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c 1036 1037 #ifdef CONFIG_PM > 1038 static int sxe_suspend(struct device *dev) 1039 { 1040 struct pci_dev *pdev = to_pci_dev(dev); 1041 int ret; 1042 bool wol_enable; 1043 struct sxe_adapter *adapter = pci_get_drvdata(pdev); 1044 struct sxe_hw *hw = &adapter->hw; 1045 1046 ret = __sxe_shutdown(pdev, &wol_enable); 1047 1048 cancel_work_sync(&adapter->monitor_ctxt.work); 1049 cancel_work_sync(&adapter->hdc_ctxt.time_sync_work); 1050 1051 sxe_hdc_channel_destroy(hw); 1052 if (ret) { 1053 LOG_ERROR_BDF("driver shutdown err:%d\n", ret); 1054 goto l_ret; 1055 } 1056 1057 LOG_DEBUG_BDF("pci dev[%p], wol_enable:%s\n", pdev, 1058 wol_enable ? "yes" : "no"); 1059 1060 if (wol_enable) { 1061 pci_prepare_to_sleep(pdev); 1062 } else { 1063 pci_wake_from_d3(pdev, false); 1064 pci_set_power_state(pdev, PCI_D3hot); 1065 } 1066 1067 l_ret: 1068 return ret; 1069 } 1070 > 1071 static int sxe_resume(struct device *dev) 1072 { 1073 struct pci_dev *pdev = to_pci_dev(dev); 1074 struct sxe_adapter *adapter = pci_get_drvdata(pdev); 1075 struct net_device *netdev = adapter->netdev; 1076 s32 ret; 1077 #ifdef SXE_WOL_CONFIGURE 1078 struct sxe_hw *hw = &adapter->hw; 1079 #endif 1080 1081 pci_set_power_state(pdev, PCI_D0); 1082 pci_restore_state(pdev); 1083 1084 pci_save_state(pdev); 1085 1086 ret = pci_enable_device_mem(pdev); 1087 if (ret) { 1088 LOG_DEV_ERR("cannot enable pci device from suspend\n"); 1089 goto l_ret; 1090 } 1091 1092 /* in order to force CPU ordering */ 1093 smp_mb__before_atomic(); 1094 clear_bit(SXE_DISABLED, &adapter->state); 1095 pci_set_master(pdev); 1096 1097 pci_wake_from_d3(pdev, false); 1098 1099 sxe_hdc_available_set(1); 1100 1101 sxe_reset(adapter); 1102 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2882/2882] drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c:2327:6: sparse: sparse: symbol 'mcp251xfd_tx_obj_write_sync' was not declared. Should it be static?
by kernel test robot 02 May '25

02 May '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 46abe407b020831448331eea487e07c883e95836 commit: b4eaf3e808dc2abcab55bc72df3b0d15961f33f0 [2882/2882] can: mcp251xfd: fix infinite loop when xmit fails config: x86_64-randconfig-123-20250502 (https://download.01.org/0day-ci/archive/20250502/202505020705.McaLXQv7-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250502/202505020705.McaLXQv7-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505020705.McaLXQv7-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c:2327:6: sparse: sparse: symbol 'mcp251xfd_tx_obj_write_sync' was not declared. Should it be static? vim +/mcp251xfd_tx_obj_write_sync +2327 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c 2326 > 2327 void mcp251xfd_tx_obj_write_sync(struct work_struct *work) 2328 { 2329 struct mcp251xfd_priv *priv = container_of(work, struct mcp251xfd_priv, 2330 tx_work); 2331 struct mcp251xfd_tx_obj *tx_obj = priv->tx_work_obj; 2332 struct mcp251xfd_tx_ring *tx_ring = priv->tx; 2333 int err; 2334 2335 err = spi_sync(priv->spi, &tx_obj->msg); 2336 if (err) 2337 mcp251xfd_tx_failure_drop(priv, tx_ring, err); 2338 } 2339 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1365/1365] drivers/acpi/cppc_acpi.c:614:3-8: WARNING: NULL check before some freeing functions is not needed.
by kernel test robot 01 May '25

01 May '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: a48a35466505c8a52da57596944bd0b4485e825f commit: b8815fbbe89b0d15fa3296c3e57d2197a92f5bc0 [1365/1365] ACPI: CPPC: Fix cppc_cpufreq_init failed in CPU Hotplug situation config: x86_64-randconfig-102-20250103 (https://download.01.org/0day-ci/archive/20250501/202505010210.KOXBibOl-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505010210.KOXBibOl-lkp@intel.com/ cocci warnings: (new ones prefixed by >>) >> drivers/acpi/cppc_acpi.c:614:3-8: WARNING: NULL check before some freeing functions is not needed. vim +614 drivers/acpi/cppc_acpi.c 576 577 int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data) 578 { 579 struct cpc_desc **cpc_pptr, *cpc_ptr; 580 int parsed_core_num = 0; 581 int i, ret; 582 583 cpc_pptr = kcalloc(num_possible_cpus(), sizeof(void *), GFP_KERNEL); 584 if (!cpc_pptr) 585 return -ENOMEM; 586 for_each_possible_cpu(i) { 587 cpc_pptr[i] = kzalloc(sizeof(struct cpc_desc), GFP_KERNEL); 588 if (!cpc_pptr[i]) { 589 ret = -ENOMEM; 590 goto out; 591 } 592 } 593 594 /* 595 * We can not use acpi_get_devices() to walk the processor devices 596 * because some processor device is not present. 597 */ 598 ret = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 599 ACPI_UINT32_MAX, acpi_parse_cpc, NULL, 600 cpc_pptr, (void **)&parsed_core_num); 601 if (ret) 602 goto out; 603 if (parsed_core_num != num_possible_cpus()) { 604 ret = -EINVAL; 605 goto out; 606 } 607 608 ret = __acpi_get_psd_map(all_cpu_data, cpc_pptr); 609 610 out: 611 for_each_possible_cpu(i) { 612 cpc_ptr = cpc_pptr[i]; 613 if (cpc_ptr) > 614 kfree(cpc_ptr); 615 } 616 kfree(cpc_pptr); 617 618 return ret; 619 } 620 EXPORT_SYMBOL_GPL(acpi_get_psd_map); 621 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2195/2195] drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:66: warning: Cannot understand * @force_free:
by kernel test robot 01 May '25

01 May '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 241523b7d82e629fd115303840c385702bf2ea5e commit: 2e6ffd454acd9b4432dfee6868f3c00be7df0b6c [2195/2195] RNP: NET: Fix rnp errors dmesg show in hygon config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250501/202505010014.X9c71jEV-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250501/202505010014.X9c71jEV-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505010014.X9c71jEV-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:66: warning: Cannot understand * @force_free: on line 66 - I thought it was a doc line vim +66 drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c 64 65 /** > 66 * @force_free: 67 * true: no other reference to this cookie, it is save to mark cookie reusable 68 * false: cookie may used by other(firmware), only available after 2min 69 **/ 70 static void mbx_free_cookie(struct mbx_req_cookie *cookie, bool force_free) 71 { 72 if (!cookie) 73 return; 74 75 if (force_free) { 76 cookie->stat = COOKIE_FREE; 77 } else { 78 cookie->stat = COOKIE_FREE_WAIT_TIMEOUT; 79 } 80 } 81 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1605/1605] block/blk-core.c:158:18: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot 30 Apr '25

30 Apr '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: a48a35466505c8a52da57596944bd0b4485e825f commit: f39ebff66fab7eee91421258aa7254ee0bbac778 [1605/1605] block: support to dispatch bio asynchronously config: x86_64-randconfig-r112-20250430 (https://download.01.org/0day-ci/archive/20250430/202504302251.rkbjGYqc-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250430/202504302251.rkbjGYqc-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202504302251.rkbjGYqc-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> block/blk-core.c:158:18: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct bio_dispatch_async_ctl [noderef] __percpu ** @@ block/blk-core.c:158:18: sparse: expected void const [noderef] __percpu *__vpp_verify block/blk-core.c:158:18: sparse: got struct bio_dispatch_async_ctl [noderef] __percpu ** >> block/blk-core.c:158:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct bio_dispatch_async_ctl *ctl @@ got struct bio_dispatch_async_ctl [noderef] __percpu * @@ block/blk-core.c:158:17: sparse: expected struct bio_dispatch_async_ctl *ctl block/blk-core.c:158:17: sparse: got struct bio_dispatch_async_ctl [noderef] __percpu * block/blk-core.c:222:18: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct bio_dispatch_async_ctl [noderef] __percpu ** @@ block/blk-core.c:222:18: sparse: expected void const [noderef] __percpu *__vpp_verify block/blk-core.c:222:18: sparse: got struct bio_dispatch_async_ctl [noderef] __percpu ** block/blk-core.c:222:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct bio_dispatch_async_ctl *ctl @@ got struct bio_dispatch_async_ctl [noderef] __percpu * @@ block/blk-core.c:222:17: sparse: expected struct bio_dispatch_async_ctl *ctl block/blk-core.c:222:17: sparse: got struct bio_dispatch_async_ctl [noderef] __percpu * >> block/blk-core.c:259:32: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct bio_dispatch_async_ctl [noderef] __percpu **static [toplevel] bio_dispatch_async_ctl @@ got struct bio_dispatch_async_ctl *[noderef] __percpu * @@ block/blk-core.c:259:32: sparse: expected struct bio_dispatch_async_ctl [noderef] __percpu **static [toplevel] bio_dispatch_async_ctl block/blk-core.c:259:32: sparse: got struct bio_dispatch_async_ctl *[noderef] __percpu * block/blk-core.c:269:18: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct bio_dispatch_async_ctl [noderef] __percpu ** @@ block/blk-core.c:269:18: sparse: expected void const [noderef] __percpu *__vpp_verify block/blk-core.c:269:18: sparse: got struct bio_dispatch_async_ctl [noderef] __percpu ** >> block/blk-core.c:269:59: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct bio_dispatch_async_ctl [noderef] __percpu * @@ got struct bio_dispatch_async_ctl *ctl @@ block/blk-core.c:269:59: sparse: expected struct bio_dispatch_async_ctl [noderef] __percpu * block/blk-core.c:269:59: sparse: got struct bio_dispatch_async_ctl *ctl block/blk-core.c: note: in included file: include/linux/backing-dev.h:511:19: sparse: sparse: incompatible types in comparison expression (different address spaces): include/linux/backing-dev.h:511:19: sparse: struct rcu_device [noderef] __rcu * include/linux/backing-dev.h:511:19: sparse: struct rcu_device * block/blk-core.c: In function 'blk_account_io_completion': block/blk-core.c:2999:21: warning: variable 'cpu' set but not used [-Wunused-but-set-variable] 2999 | int cpu; | ^~~ vim +158 block/blk-core.c 152 153 static int bio_dispatch_work(void *data) 154 { 155 int loop_count = 0; 156 int cpu = smp_processor_id(); 157 struct bio_dispatch_async_ctl *ctl = > 158 *per_cpu_ptr(bio_dispatch_async_ctl, cpu); 159 160 for (;; loop_count++) { 161 struct bio_list bio_list_on_stack; 162 struct blk_plug plug; 163 struct bio *bio; 164 int count; 165 166 bio_list_init(&bio_list_on_stack); 167 count = collect_bio(ctl, &bio_list_on_stack); 168 169 if (!count) { 170 DEFINE_WAIT(wait); 171 172 for (;;) { 173 prepare_to_wait(&ctl->wait, &wait, 174 TASK_INTERRUPTIBLE); 175 count = collect_bio(ctl, &bio_list_on_stack); 176 if (count) 177 break; 178 schedule(); 179 loop_count = 0; 180 } 181 finish_wait(&ctl->wait, &wait); 182 183 } 184 185 blk_start_plug(&plug); 186 while ((bio = bio_list_pop(&bio_list_on_stack))) { 187 struct request_queue *q = bio->bi_disk->queue; 188 189 q->make_request_fn(q, bio); 190 } 191 blk_finish_plug(&plug); 192 193 /* prevent soft lockup */ 194 if (loop_count >= BIO_DISPATCH_MAX_LOOP) { 195 loop_count = 0; 196 cond_resched(); 197 } 198 } 199 200 return 0; 201 } 202 203 static int get_dispatch_cpu(struct request_queue *q, int cpu) 204 { 205 int *last_dispatch_cpu = per_cpu_ptr(q->last_dispatch_cpu, cpu); 206 207 cpu = cpumask_next(*last_dispatch_cpu, &q->dispatch_async_cpus); 208 if (cpu >= nr_cpu_ids) 209 cpu = cpumask_first(&q->dispatch_async_cpus); 210 211 *last_dispatch_cpu = cpu; 212 213 return cpu; 214 } 215 216 static void blk_queue_make_request_async(struct bio *bio) 217 { 218 struct request_queue *q = bio->bi_disk->queue; 219 int cpu = smp_processor_id(); 220 int dispatch_cpu = get_dispatch_cpu(q, cpu); 221 struct bio_dispatch_async_ctl *ctl = 222 *per_cpu_ptr(bio_dispatch_async_ctl, dispatch_cpu); 223 224 spin_lock_irq(bio_async_lock(ctl, cpu)); 225 bio_list_add(bio_async_list(ctl, cpu), bio); 226 spin_unlock_irq(bio_async_lock(ctl, cpu)); 227 228 if (wq_has_sleeper(&ctl->wait)) 229 wake_up(&ctl->wait); 230 } 231 232 static blk_qc_t blk_queue_do_make_request(struct bio *bio) 233 { 234 struct request_queue *q = bio->bi_disk->queue; 235 int cpu = smp_processor_id(); 236 237 /* 238 * Don't dispatch bio asynchronously in following cases: 239 * 240 * 1) QUEUE_FLAG_DISPATCH_ASYNC is not set; 241 * 2) current cpu is the target cpu; 242 * 3) bio is flagged no wait; 243 * 4) TODO: return value of submit_bio() will be used in io polling. 244 */ 245 if (!test_bit(QUEUE_FLAG_DISPATCH_ASYNC, &q->queue_flags) || 246 cpumask_test_cpu(cpu, &q->dispatch_async_cpus) || 247 bio->bi_opf & REQ_NOWAIT) 248 return q->make_request_fn(q, bio); 249 250 /* return value is not concerned */ 251 blk_queue_make_request_async(bio); 252 return BLK_QC_T_NONE; 253 } 254 255 static void init_blk_queue_async_dispatch(void) 256 { 257 int cpu; 258 > 259 bio_dispatch_async_ctl = alloc_percpu(struct bio_dispatch_async_ctl *); 260 if (!bio_dispatch_async_ctl) 261 panic("Failed to alloc bio_dispatch_async_ctl\n"); 262 263 for_each_possible_cpu(cpu) { 264 int i; 265 struct bio_dispatch_async_ctl *ctl = 266 kmalloc(sizeof(struct bio_dispatch_async_ctl), 267 GFP_KERNEL | __GFP_NOFAIL); 268 > 269 *per_cpu_ptr(bio_dispatch_async_ctl, cpu) = ctl; 270 271 ctl->thread = 272 kthread_create_on_cpu(bio_dispatch_work, NULL, cpu, 273 "bio_dispatch_work_%u"); 274 if (IS_ERR_OR_NULL(ctl->thread)) 275 panic("Failed to create bio dispatch thread\n"); 276 277 ctl->list = kmalloc_array(nr_cpu_ids, 278 sizeof(struct bio_list) << BIO_ASYNC_LIST_SHIFT, 279 GFP_KERNEL | __GFP_NOFAIL); 280 ctl->lock = kmalloc_array(nr_cpu_ids, 281 sizeof(spinlock_t) << BIO_ASYNC_LOCK_SHIFT, 282 GFP_KERNEL | __GFP_NOFAIL); 283 for (i = 0; i < nr_cpu_ids; ++i) { 284 bio_list_init(bio_async_list(ctl, i)); 285 spin_lock_init(bio_async_lock(ctl, i)); 286 } 287 288 wake_up_process(ctl->thread); 289 init_waitqueue_head(&ctl->wait); 290 } 291 } 292 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • ...
  • 1867
  • Older →

HyperKitty Powered by HyperKitty