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
- 27 participants
- 18548 discussions

[openeuler:openEuler-1.0-LTS 1521/21575] drivers/scsi/libsas/sas_expander.c:2079: undefined reference to `ata_dev_same_device'
by kernel test robot 29 Jan '24
by kernel test robot 29 Jan '24
29 Jan '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: e0207e2784d0f836e732608faf1a6966546a8eb3
commit: d856ec500c97835c591ffacc005f514509f1a931 [1521/21575] scsi: libsas: check if the same sata device when flutter
:::::: branch date: 13 hours ago
:::::: commit date: 4 years, 1 month ago
config: x86_64-randconfig-r113-20240125 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (attached as 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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401261034.TNcmiPjc-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: warning: arch/x86/lib/csum-copy_64.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
ld: warning: arch/x86/lib/csum-copy_64.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
ld: warning: .tmp_vmlinux1 has a LOAD segment with RWX permissions
ld: drivers/scsi/libsas/sas_expander.o: in function `sas_rediscover_dev':
>> drivers/scsi/libsas/sas_expander.c:2079: undefined reference to `ata_dev_same_device'
vim +2079 drivers/scsi/libsas/sas_expander.c
354cf82980e244 Dan Williams 2012-01-12 2011
19252de6818ced Tom Peng 2009-07-17 2012 static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last)
2908d778ab3e24 James Bottomley 2006-08-29 2013 {
2908d778ab3e24 James Bottomley 2006-08-29 2014 struct expander_device *ex = &dev->ex_dev;
2908d778ab3e24 James Bottomley 2006-08-29 2015 struct ex_phy *phy = &ex->ex_phy[phy_id];
d12b2bcfd3801c Jason Yan 2018-12-28 2016 struct asd_sas_port *port = dev->port;
d12b2bcfd3801c Jason Yan 2018-12-28 2017 struct asd_sas_phy *sas_phy;
aa9f8328fc5146 James Bottomley 2013-05-07 2018 enum sas_device_type type = SAS_PHY_UNUSED;
354cf82980e244 Dan Williams 2012-01-12 2019 u8 sas_addr[8];
2908d778ab3e24 James Bottomley 2006-08-29 2020 int res;
2908d778ab3e24 James Bottomley 2006-08-29 2021
b2311a287553af Jeff Skirvin 2012-06-21 2022 memset(sas_addr, 0, 8);
354cf82980e244 Dan Williams 2012-01-12 2023 res = sas_get_phy_attached_dev(dev, phy_id, sas_addr, &type);
2908d778ab3e24 James Bottomley 2006-08-29 2024 switch (res) {
2908d778ab3e24 James Bottomley 2006-08-29 2025 case SMP_RESP_NO_PHY:
2908d778ab3e24 James Bottomley 2006-08-29 2026 phy->phy_state = PHY_NOT_PRESENT;
19252de6818ced Tom Peng 2009-07-17 2027 sas_unregister_devs_sas_addr(dev, phy_id, last);
354cf82980e244 Dan Williams 2012-01-12 2028 return res;
2908d778ab3e24 James Bottomley 2006-08-29 2029 case SMP_RESP_PHY_VACANT:
2908d778ab3e24 James Bottomley 2006-08-29 2030 phy->phy_state = PHY_VACANT;
19252de6818ced Tom Peng 2009-07-17 2031 sas_unregister_devs_sas_addr(dev, phy_id, last);
354cf82980e244 Dan Williams 2012-01-12 2032 return res;
2908d778ab3e24 James Bottomley 2006-08-29 2033 case SMP_RESP_FUNC_ACC:
2908d778ab3e24 James Bottomley 2006-08-29 2034 break;
b2311a287553af Jeff Skirvin 2012-06-21 2035 case -ECOMM:
b2311a287553af Jeff Skirvin 2012-06-21 2036 break;
b2311a287553af Jeff Skirvin 2012-06-21 2037 default:
b2311a287553af Jeff Skirvin 2012-06-21 2038 return res;
2908d778ab3e24 James Bottomley 2006-08-29 2039 }
2908d778ab3e24 James Bottomley 2006-08-29 2040
b2311a287553af Jeff Skirvin 2012-06-21 2041 if ((SAS_ADDR(sas_addr) == 0) || (res == -ECOMM)) {
2908d778ab3e24 James Bottomley 2006-08-29 2042 phy->phy_state = PHY_EMPTY;
19252de6818ced Tom Peng 2009-07-17 2043 sas_unregister_devs_sas_addr(dev, phy_id, last);
354cf82980e244 Dan Williams 2012-01-12 2044 return res;
354cf82980e244 Dan Williams 2012-01-12 2045 } else if (SAS_ADDR(sas_addr) == SAS_ADDR(phy->attached_sas_addr) &&
354cf82980e244 Dan Williams 2012-01-12 2046 dev_type_flutter(type, phy->attached_dev_type)) {
354cf82980e244 Dan Williams 2012-01-12 2047 struct domain_device *ata_dev = sas_ex_to_ata(dev, phy_id);
354cf82980e244 Dan Williams 2012-01-12 2048 char *action = "";
354cf82980e244 Dan Williams 2012-01-12 2049
a01e70e570a72b James Bottomley 2006-09-06 2050 sas_ex_phy_discover(dev, phy_id);
354cf82980e244 Dan Williams 2012-01-12 2051
aa9f8328fc5146 James Bottomley 2013-05-07 2052 if (ata_dev && phy->attached_dev_type == SAS_SATA_PENDING)
354cf82980e244 Dan Williams 2012-01-12 2053 action = ", needs recovery";
354cf82980e244 Dan Williams 2012-01-12 2054 SAS_DPRINTK("ex %016llx phy 0x%x broadcast flutter%s\n",
354cf82980e244 Dan Williams 2012-01-12 2055 SAS_ADDR(dev->sas_addr), phy_id, action);
d856ec500c9783 Jason Yan 2018-12-28 2056
d856ec500c9783 Jason Yan 2018-12-28 2057 /* the phy attached address will be updated by sas_ex_phy_discover()
d856ec500c9783 Jason Yan 2018-12-28 2058 * and sometimes become abnormal
d856ec500c9783 Jason Yan 2018-12-28 2059 */
d856ec500c9783 Jason Yan 2018-12-28 2060 if (SAS_ADDR(phy->attached_sas_addr) != SAS_ADDR(sas_addr) ||
d856ec500c9783 Jason Yan 2018-12-28 2061 SAS_ADDR(phy->attached_sas_addr) == 0) {
d856ec500c9783 Jason Yan 2018-12-28 2062 /* if attached_sas_addr become abnormal, we must set the
d856ec500c9783 Jason Yan 2018-12-28 2063 * original address back so that the device can be unregistered
d856ec500c9783 Jason Yan 2018-12-28 2064 */
d856ec500c9783 Jason Yan 2018-12-28 2065 memcpy(phy->attached_sas_addr, sas_addr, SAS_ADDR_SIZE);
d856ec500c9783 Jason Yan 2018-12-28 2066 SAS_DPRINTK("phy address(%016llx) abnormal, origin:%016llx\n",
d856ec500c9783 Jason Yan 2018-12-28 2067 SAS_ADDR(phy->attached_sas_addr),
d856ec500c9783 Jason Yan 2018-12-28 2068 SAS_ADDR(sas_addr));
d856ec500c9783 Jason Yan 2018-12-28 2069 goto unregister;
d856ec500c9783 Jason Yan 2018-12-28 2070 }
d856ec500c9783 Jason Yan 2018-12-28 2071
d856ec500c9783 Jason Yan 2018-12-28 2072
d856ec500c9783 Jason Yan 2018-12-28 2073 if (ata_dev) {
d856ec500c9783 Jason Yan 2018-12-28 2074 struct ata_device *adev = sas_to_ata_dev(ata_dev);
d856ec500c9783 Jason Yan 2018-12-28 2075 unsigned int class = ata_dev->sata_dev.class;
d856ec500c9783 Jason Yan 2018-12-28 2076 u16 *id = ata_dev->sata_dev.id;
d856ec500c9783 Jason Yan 2018-12-28 2077
d856ec500c9783 Jason Yan 2018-12-28 2078 /* to see if the disk is replaced with another one */
d856ec500c9783 Jason Yan 2018-12-28 @2079 if (!ata_dev_same_device(adev, class, id))
d856ec500c9783 Jason Yan 2018-12-28 2080 goto unregister;
d856ec500c9783 Jason Yan 2018-12-28 2081 }
d856ec500c9783 Jason Yan 2018-12-28 2082
2908d778ab3e24 James Bottomley 2006-08-29 2083 return res;
2908d778ab3e24 James Bottomley 2006-08-29 2084 }
2908d778ab3e24 James Bottomley 2006-08-29 2085
d856ec500c9783 Jason Yan 2018-12-28 2086 unregister:
24b7c4b6e22de5 Jason Yan 2018-12-28 2087 /* we always have to delete the old device when we went here */
c666aae6919114 Dan Williams 2012-01-19 2088 SAS_DPRINTK("ex %016llx phy 0x%x replace %016llx\n",
c666aae6919114 Dan Williams 2012-01-19 2089 SAS_ADDR(dev->sas_addr), phy_id,
c666aae6919114 Dan Williams 2012-01-19 2090 SAS_ADDR(phy->attached_sas_addr));
c666aae6919114 Dan Williams 2012-01-19 2091 sas_unregister_devs_sas_addr(dev, phy_id, last);
c666aae6919114 Dan Williams 2012-01-19 2092
d12b2bcfd3801c Jason Yan 2018-12-28 2093 /* force the next revalidation find this phy and bring it up */
d12b2bcfd3801c Jason Yan 2018-12-28 2094 phy->phy_change_count = -1;
d12b2bcfd3801c Jason Yan 2018-12-28 2095 ex->ex_change_count = -1;
d12b2bcfd3801c Jason Yan 2018-12-28 2096 sas_phy = container_of(port->phy_list.next, struct asd_sas_phy,
d12b2bcfd3801c Jason Yan 2018-12-28 2097 port_phy_el);
d12b2bcfd3801c Jason Yan 2018-12-28 2098 port->ha->notify_port_event(sas_phy, PORTE_BROADCAST_RCVD);
d12b2bcfd3801c Jason Yan 2018-12-28 2099
d12b2bcfd3801c Jason Yan 2018-12-28 2100 return 0;
354cf82980e244 Dan Williams 2012-01-12 2101 }
354cf82980e244 Dan Williams 2012-01-12 2102
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:openEuler-1.0-LTS 1581/21575] drivers/pci/probe.c:2223:3: sparse: sparse: symbol 'skip_1620_bus_num' was not declared. Should it be static?
by kernel test robot 29 Jan '24
by kernel test robot 29 Jan '24
29 Jan '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: e0207e2784d0f836e732608faf1a6966546a8eb3
commit: da5e23f4c7511cbc1a199bb4d5d5477e191dc26c [1581/21575] Hi1620 CS FPGA PCIe Skip Bus
:::::: branch date: 16 hours ago
:::::: commit date: 4 years, 1 month ago
config: x86_64-randconfig-121-20240125 (attached as .config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (attached as 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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401261304.VfCawDjG-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/pci/probe.c:2223:3: sparse: sparse: symbol 'skip_1620_bus_num' was not declared. Should it be static?
drivers/pci/probe.c:448:21: sparse: sparse: self-comparison always evaluates to false
vim +/skip_1620_bus_num +2223 drivers/pci/probe.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 2214
da5e23f4c7511c Dong Bo 2018-01-30 2215 static int skip_bus_flag = 0;
da5e23f4c7511c Dong Bo 2018-01-30 2216 #define HOSTBRIGE_1620_NUM 48
da5e23f4c7511c Dong Bo 2018-01-30 2217 struct skip_bus_num {
da5e23f4c7511c Dong Bo 2018-01-30 2218 char module_name[32];
da5e23f4c7511c Dong Bo 2018-01-30 2219 char label[4];
da5e23f4c7511c Dong Bo 2018-01-30 2220 int bus_num;
da5e23f4c7511c Dong Bo 2018-01-30 2221 int dev_num;
da5e23f4c7511c Dong Bo 2018-01-30 2222 int skip;
da5e23f4c7511c Dong Bo 2018-01-30 @2223 } skip_1620_bus_num[HOSTBRIGE_1620_NUM] = {
da5e23f4c7511c Dong Bo 2018-01-30 2224 /*chip 0*/
da5e23f4c7511c Dong Bo 2018-01-30 2225 {
da5e23f4c7511c Dong Bo 2018-01-30 2226 .module_name = "chip0_pcie",
da5e23f4c7511c Dong Bo 2018-01-30 2227 .label = "a0",
da5e23f4c7511c Dong Bo 2018-01-30 2228 .bus_num = 0,
da5e23f4c7511c Dong Bo 2018-01-30 2229 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2230 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2231 },
da5e23f4c7511c Dong Bo 2018-01-30 2232 {
da5e23f4c7511c Dong Bo 2018-01-30 2233 .module_name = "chip0_pcie_dma",
da5e23f4c7511c Dong Bo 2018-01-30 2234 .label = "a1",
da5e23f4c7511c Dong Bo 2018-01-30 2235 .bus_num = 0x7b,
da5e23f4c7511c Dong Bo 2018-01-30 2236 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2237 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2238 },
da5e23f4c7511c Dong Bo 2018-01-30 2239 {
da5e23f4c7511c Dong Bo 2018-01-30 2240 .module_name = "chip0_pcie_sdi",
da5e23f4c7511c Dong Bo 2018-01-30 2241 .label = "a2",
da5e23f4c7511c Dong Bo 2018-01-30 2242 .bus_num = 0x7b,
da5e23f4c7511c Dong Bo 2018-01-30 2243 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2244 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2245 },
da5e23f4c7511c Dong Bo 2018-01-30 2246 {
da5e23f4c7511c Dong Bo 2018-01-30 2247 .module_name = "chip0_USB",
da5e23f4c7511c Dong Bo 2018-01-30 2248 .label = "a3",
da5e23f4c7511c Dong Bo 2018-01-30 2249 .bus_num = 0x7a,
da5e23f4c7511c Dong Bo 2018-01-30 2250 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2251 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2252 },
da5e23f4c7511c Dong Bo 2018-01-30 2253 {
da5e23f4c7511c Dong Bo 2018-01-30 2254 .module_name = "chip0_hpre",
da5e23f4c7511c Dong Bo 2018-01-30 2255 .label = "a4",
da5e23f4c7511c Dong Bo 2018-01-30 2256 .bus_num = 0x78,
da5e23f4c7511c Dong Bo 2018-01-30 2257 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2258 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2259 },
da5e23f4c7511c Dong Bo 2018-01-30 2260 {
da5e23f4c7511c Dong Bo 2018-01-30 2261 .module_name = "chip0_rde",
da5e23f4c7511c Dong Bo 2018-01-30 2262 .label = "a5",
da5e23f4c7511c Dong Bo 2018-01-30 2263 .bus_num = 0x78,
da5e23f4c7511c Dong Bo 2018-01-30 2264 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2265 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2266 },
da5e23f4c7511c Dong Bo 2018-01-30 2267 {
da5e23f4c7511c Dong Bo 2018-01-30 2268 .module_name = "chip0_nic",
da5e23f4c7511c Dong Bo 2018-01-30 2269 .label = "aa",
da5e23f4c7511c Dong Bo 2018-01-30 2270 .bus_num = 0x7c,
da5e23f4c7511c Dong Bo 2018-01-30 2271 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2272 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2273 },
da5e23f4c7511c Dong Bo 2018-01-30 2274 {
da5e23f4c7511c Dong Bo 2018-01-30 2275 .module_name = "chip0_sas",
da5e23f4c7511c Dong Bo 2018-01-30 2276 .label = "a6",
da5e23f4c7511c Dong Bo 2018-01-30 2277 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2278 .dev_num = 0x02,
da5e23f4c7511c Dong Bo 2018-01-30 2279 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2280 },
da5e23f4c7511c Dong Bo 2018-01-30 2281 {
da5e23f4c7511c Dong Bo 2018-01-30 2282 .module_name = "chip0_sas1",
da5e23f4c7511c Dong Bo 2018-01-30 2283 .label = "ab",
da5e23f4c7511c Dong Bo 2018-01-30 2284 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2285 .dev_num = 0x04,
da5e23f4c7511c Dong Bo 2018-01-30 2286 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2287 },
da5e23f4c7511c Dong Bo 2018-01-30 2288 {
da5e23f4c7511c Dong Bo 2018-01-30 2289 .module_name = "chip0_sata",
da5e23f4c7511c Dong Bo 2018-01-30 2290 .label = "a7",
da5e23f4c7511c Dong Bo 2018-01-30 2291 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2292 .dev_num = 0x03,
da5e23f4c7511c Dong Bo 2018-01-30 2293 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2294 },
da5e23f4c7511c Dong Bo 2018-01-30 2295 {
da5e23f4c7511c Dong Bo 2018-01-30 2296 .module_name = "chip0_zip",
da5e23f4c7511c Dong Bo 2018-01-30 2297 .label = "a8",
da5e23f4c7511c Dong Bo 2018-01-30 2298 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2299 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2300 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2301 },
da5e23f4c7511c Dong Bo 2018-01-30 2302 {
da5e23f4c7511c Dong Bo 2018-01-30 2303 .module_name = "chip0_sec",
da5e23f4c7511c Dong Bo 2018-01-30 2304 .label = "a9",
da5e23f4c7511c Dong Bo 2018-01-30 2305 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2306 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2307 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2308 },
da5e23f4c7511c Dong Bo 2018-01-30 2309 /*chip 1*/
da5e23f4c7511c Dong Bo 2018-01-30 2310 {
da5e23f4c7511c Dong Bo 2018-01-30 2311 .module_name = "chip1_pcie",
da5e23f4c7511c Dong Bo 2018-01-30 2312 .label = "b0",
da5e23f4c7511c Dong Bo 2018-01-30 2313 .bus_num = 0x80,
da5e23f4c7511c Dong Bo 2018-01-30 2314 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2315 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2316 },
da5e23f4c7511c Dong Bo 2018-01-30 2317 {
da5e23f4c7511c Dong Bo 2018-01-30 2318 .module_name = "chip1_pcie_dma",
da5e23f4c7511c Dong Bo 2018-01-30 2319 .label = "b1",
da5e23f4c7511c Dong Bo 2018-01-30 2320 .bus_num = 0xbb,
da5e23f4c7511c Dong Bo 2018-01-30 2321 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2322 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2323 },
da5e23f4c7511c Dong Bo 2018-01-30 2324 {
da5e23f4c7511c Dong Bo 2018-01-30 2325 .module_name = "chip1_pcie_sdi",
da5e23f4c7511c Dong Bo 2018-01-30 2326 .label = "b2",
da5e23f4c7511c Dong Bo 2018-01-30 2327 .bus_num = 0xbb,
da5e23f4c7511c Dong Bo 2018-01-30 2328 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2329 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2330 },
da5e23f4c7511c Dong Bo 2018-01-30 2331 {
da5e23f4c7511c Dong Bo 2018-01-30 2332 .module_name = "chip1_USB",
da5e23f4c7511c Dong Bo 2018-01-30 2333 .label = "b3",
da5e23f4c7511c Dong Bo 2018-01-30 2334 .bus_num = 0xba,
da5e23f4c7511c Dong Bo 2018-01-30 2335 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2336 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2337 },
da5e23f4c7511c Dong Bo 2018-01-30 2338 {
da5e23f4c7511c Dong Bo 2018-01-30 2339 .module_name = "chip1_hpre",
da5e23f4c7511c Dong Bo 2018-01-30 2340 .label = "b4",
da5e23f4c7511c Dong Bo 2018-01-30 2341 .bus_num = 0xb8,
da5e23f4c7511c Dong Bo 2018-01-30 2342 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2343 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2344 },
da5e23f4c7511c Dong Bo 2018-01-30 2345 {
da5e23f4c7511c Dong Bo 2018-01-30 2346 .module_name = "chip1_rde",
da5e23f4c7511c Dong Bo 2018-01-30 2347 .label = "b5",
da5e23f4c7511c Dong Bo 2018-01-30 2348 .bus_num = 0xb8,
da5e23f4c7511c Dong Bo 2018-01-30 2349 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2350 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2351 },
da5e23f4c7511c Dong Bo 2018-01-30 2352 {
da5e23f4c7511c Dong Bo 2018-01-30 2353 .module_name = "chip1_nic",
da5e23f4c7511c Dong Bo 2018-01-30 2354 .label = "ba",
da5e23f4c7511c Dong Bo 2018-01-30 2355 .bus_num = 0xbc,
da5e23f4c7511c Dong Bo 2018-01-30 2356 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2357 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2358 },
da5e23f4c7511c Dong Bo 2018-01-30 2359 {
da5e23f4c7511c Dong Bo 2018-01-30 2360 .module_name = "chip1_sas",
da5e23f4c7511c Dong Bo 2018-01-30 2361 .label = "b6",
da5e23f4c7511c Dong Bo 2018-01-30 2362 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2363 .dev_num = 0x02,
da5e23f4c7511c Dong Bo 2018-01-30 2364 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2365 },
da5e23f4c7511c Dong Bo 2018-01-30 2366 {
da5e23f4c7511c Dong Bo 2018-01-30 2367 .module_name = "chip1_sas1",
da5e23f4c7511c Dong Bo 2018-01-30 2368 .label = "bb",
da5e23f4c7511c Dong Bo 2018-01-30 2369 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2370 .dev_num = 0x04,
da5e23f4c7511c Dong Bo 2018-01-30 2371 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2372 },
da5e23f4c7511c Dong Bo 2018-01-30 2373 {
da5e23f4c7511c Dong Bo 2018-01-30 2374 .module_name = "chip1_sata",
da5e23f4c7511c Dong Bo 2018-01-30 2375 .label = "b7",
da5e23f4c7511c Dong Bo 2018-01-30 2376 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2377 .dev_num = 0x03,
da5e23f4c7511c Dong Bo 2018-01-30 2378 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2379 },
da5e23f4c7511c Dong Bo 2018-01-30 2380 {
da5e23f4c7511c Dong Bo 2018-01-30 2381 .module_name = "chip1_zip",
da5e23f4c7511c Dong Bo 2018-01-30 2382 .label = "b8",
da5e23f4c7511c Dong Bo 2018-01-30 2383 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2384 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2385 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2386 },
da5e23f4c7511c Dong Bo 2018-01-30 2387 {
da5e23f4c7511c Dong Bo 2018-01-30 2388 .module_name = "chip0_sec",
da5e23f4c7511c Dong Bo 2018-01-30 2389 .label = "b9",
da5e23f4c7511c Dong Bo 2018-01-30 2390 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2391 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2392 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2393 },
da5e23f4c7511c Dong Bo 2018-01-30 2394
da5e23f4c7511c Dong Bo 2018-01-30 2395 /*chip 2*/
da5e23f4c7511c Dong Bo 2018-01-30 2396 {
da5e23f4c7511c Dong Bo 2018-01-30 2397 .module_name = "chip2_pcie",
da5e23f4c7511c Dong Bo 2018-01-30 2398 .label = "c0",
da5e23f4c7511c Dong Bo 2018-01-30 2399 .bus_num = 0xc0,
da5e23f4c7511c Dong Bo 2018-01-30 2400 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2401 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2402 },
da5e23f4c7511c Dong Bo 2018-01-30 2403 {
da5e23f4c7511c Dong Bo 2018-01-30 2404 .module_name = "chip2_pcie_dma",
da5e23f4c7511c Dong Bo 2018-01-30 2405 .label = "c1",
da5e23f4c7511c Dong Bo 2018-01-30 2406 .bus_num = 0xdb,
da5e23f4c7511c Dong Bo 2018-01-30 2407 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2408 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2409 },
da5e23f4c7511c Dong Bo 2018-01-30 2410 {
da5e23f4c7511c Dong Bo 2018-01-30 2411 .module_name = "chip2_pcie_sdi",
da5e23f4c7511c Dong Bo 2018-01-30 2412 .label = "c2",
da5e23f4c7511c Dong Bo 2018-01-30 2413 .bus_num = 0xdb,
da5e23f4c7511c Dong Bo 2018-01-30 2414 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2415 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2416 },
da5e23f4c7511c Dong Bo 2018-01-30 2417 {
da5e23f4c7511c Dong Bo 2018-01-30 2418 .module_name = "chip2_USB",
da5e23f4c7511c Dong Bo 2018-01-30 2419 .label = "c3",
da5e23f4c7511c Dong Bo 2018-01-30 2420 .bus_num = 0xda,
da5e23f4c7511c Dong Bo 2018-01-30 2421 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2422 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2423 },
da5e23f4c7511c Dong Bo 2018-01-30 2424 {
da5e23f4c7511c Dong Bo 2018-01-30 2425 .module_name = "chip2_hpre",
da5e23f4c7511c Dong Bo 2018-01-30 2426 .label = "c4",
da5e23f4c7511c Dong Bo 2018-01-30 2427 .bus_num = 0xd8,
da5e23f4c7511c Dong Bo 2018-01-30 2428 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2429 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2430 },
da5e23f4c7511c Dong Bo 2018-01-30 2431 {
da5e23f4c7511c Dong Bo 2018-01-30 2432 .module_name = "chip2_rde",
da5e23f4c7511c Dong Bo 2018-01-30 2433 .label = "c5",
da5e23f4c7511c Dong Bo 2018-01-30 2434 .bus_num = 0xd8,
da5e23f4c7511c Dong Bo 2018-01-30 2435 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2436 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2437 },
da5e23f4c7511c Dong Bo 2018-01-30 2438 {
da5e23f4c7511c Dong Bo 2018-01-30 2439 .module_name = "chip2_nic",
da5e23f4c7511c Dong Bo 2018-01-30 2440 .label = "ca",
da5e23f4c7511c Dong Bo 2018-01-30 2441 .bus_num = 0xdc,
da5e23f4c7511c Dong Bo 2018-01-30 2442 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2443 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2444 },
da5e23f4c7511c Dong Bo 2018-01-30 2445 {
da5e23f4c7511c Dong Bo 2018-01-30 2446 .module_name = "chip2_sas",
da5e23f4c7511c Dong Bo 2018-01-30 2447 .label = "c6",
da5e23f4c7511c Dong Bo 2018-01-30 2448 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2449 .dev_num = 0x02,
da5e23f4c7511c Dong Bo 2018-01-30 2450 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2451 },
da5e23f4c7511c Dong Bo 2018-01-30 2452 {
da5e23f4c7511c Dong Bo 2018-01-30 2453 .module_name = "chip2_sas1",
da5e23f4c7511c Dong Bo 2018-01-30 2454 .label = "cb",
da5e23f4c7511c Dong Bo 2018-01-30 2455 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2456 .dev_num = 0x04,
da5e23f4c7511c Dong Bo 2018-01-30 2457 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2458 },
da5e23f4c7511c Dong Bo 2018-01-30 2459 {
da5e23f4c7511c Dong Bo 2018-01-30 2460 .module_name = "chip2_sata",
da5e23f4c7511c Dong Bo 2018-01-30 2461 .label = "c7",
da5e23f4c7511c Dong Bo 2018-01-30 2462 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2463 .dev_num = 0x03,
da5e23f4c7511c Dong Bo 2018-01-30 2464 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2465 },
da5e23f4c7511c Dong Bo 2018-01-30 2466 {
da5e23f4c7511c Dong Bo 2018-01-30 2467 .module_name = "chip2_zip",
da5e23f4c7511c Dong Bo 2018-01-30 2468 .label = "c8",
da5e23f4c7511c Dong Bo 2018-01-30 2469 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2470 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2471 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2472 },
da5e23f4c7511c Dong Bo 2018-01-30 2473 {
da5e23f4c7511c Dong Bo 2018-01-30 2474 .module_name = "chip2_sec",
da5e23f4c7511c Dong Bo 2018-01-30 2475 .label = "c9",
da5e23f4c7511c Dong Bo 2018-01-30 2476 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2477 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2478 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2479 },
da5e23f4c7511c Dong Bo 2018-01-30 2480
da5e23f4c7511c Dong Bo 2018-01-30 2481 /*chip 3*/
da5e23f4c7511c Dong Bo 2018-01-30 2482 {
da5e23f4c7511c Dong Bo 2018-01-30 2483 .module_name = "chip3_pcie",
da5e23f4c7511c Dong Bo 2018-01-30 2484 .label = "d0",
da5e23f4c7511c Dong Bo 2018-01-30 2485 .bus_num = 0xe0,
da5e23f4c7511c Dong Bo 2018-01-30 2486 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2487 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2488 },
da5e23f4c7511c Dong Bo 2018-01-30 2489 {
da5e23f4c7511c Dong Bo 2018-01-30 2490 .module_name = "chip3_pcie_dma",
da5e23f4c7511c Dong Bo 2018-01-30 2491 .label = "d1",
da5e23f4c7511c Dong Bo 2018-01-30 2492 .bus_num = 0xfb,
da5e23f4c7511c Dong Bo 2018-01-30 2493 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2494 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2495 },
da5e23f4c7511c Dong Bo 2018-01-30 2496 {
da5e23f4c7511c Dong Bo 2018-01-30 2497 .module_name = "chip3_pcie_sdi",
da5e23f4c7511c Dong Bo 2018-01-30 2498 .label = "d2",
da5e23f4c7511c Dong Bo 2018-01-30 2499 .bus_num = 0xfb,
da5e23f4c7511c Dong Bo 2018-01-30 2500 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2501 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2502 },
da5e23f4c7511c Dong Bo 2018-01-30 2503 {
da5e23f4c7511c Dong Bo 2018-01-30 2504 .module_name = "chip3_USB",
da5e23f4c7511c Dong Bo 2018-01-30 2505 .label = "d3",
da5e23f4c7511c Dong Bo 2018-01-30 2506 .bus_num = 0xfa,
da5e23f4c7511c Dong Bo 2018-01-30 2507 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2508 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2509 },
da5e23f4c7511c Dong Bo 2018-01-30 2510 {
da5e23f4c7511c Dong Bo 2018-01-30 2511 .module_name = "chip3_hpre",
da5e23f4c7511c Dong Bo 2018-01-30 2512 .label = "d4",
da5e23f4c7511c Dong Bo 2018-01-30 2513 .bus_num = 0xf8,
da5e23f4c7511c Dong Bo 2018-01-30 2514 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2515 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2516 },
da5e23f4c7511c Dong Bo 2018-01-30 2517 {
da5e23f4c7511c Dong Bo 2018-01-30 2518 .module_name = "chip3_rde",
da5e23f4c7511c Dong Bo 2018-01-30 2519 .label = "d5",
da5e23f4c7511c Dong Bo 2018-01-30 2520 .bus_num = 0xf8,
da5e23f4c7511c Dong Bo 2018-01-30 2521 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2522 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2523 },
da5e23f4c7511c Dong Bo 2018-01-30 2524 {
da5e23f4c7511c Dong Bo 2018-01-30 2525 .module_name = "chip3_nic",
da5e23f4c7511c Dong Bo 2018-01-30 2526 .label = "da",
da5e23f4c7511c Dong Bo 2018-01-30 2527 .bus_num = 0xfc,
da5e23f4c7511c Dong Bo 2018-01-30 2528 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2529 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2530 },
da5e23f4c7511c Dong Bo 2018-01-30 2531 {
da5e23f4c7511c Dong Bo 2018-01-30 2532 .module_name = "chip3_sas",
da5e23f4c7511c Dong Bo 2018-01-30 2533 .label = "d6",
da5e23f4c7511c Dong Bo 2018-01-30 2534 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2535 .dev_num = 0x02,
da5e23f4c7511c Dong Bo 2018-01-30 2536 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2537 },
da5e23f4c7511c Dong Bo 2018-01-30 2538 {
da5e23f4c7511c Dong Bo 2018-01-30 2539 .module_name = "chip3_sas1",
da5e23f4c7511c Dong Bo 2018-01-30 2540 .label = "db",
da5e23f4c7511c Dong Bo 2018-01-30 2541 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2542 .dev_num = 0x04,
da5e23f4c7511c Dong Bo 2018-01-30 2543 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2544 },
da5e23f4c7511c Dong Bo 2018-01-30 2545 {
da5e23f4c7511c Dong Bo 2018-01-30 2546 .module_name = "chip3_sata",
da5e23f4c7511c Dong Bo 2018-01-30 2547 .label = "d7",
da5e23f4c7511c Dong Bo 2018-01-30 2548 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2549 .dev_num = 0x03,
da5e23f4c7511c Dong Bo 2018-01-30 2550 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2551 },
da5e23f4c7511c Dong Bo 2018-01-30 2552 {
da5e23f4c7511c Dong Bo 2018-01-30 2553 .module_name = "chip3_zip",
da5e23f4c7511c Dong Bo 2018-01-30 2554 .label = "d8",
da5e23f4c7511c Dong Bo 2018-01-30 2555 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2556 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2557 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2558 },
da5e23f4c7511c Dong Bo 2018-01-30 2559 {
da5e23f4c7511c Dong Bo 2018-01-30 2560 .module_name = "chip3_sec",
da5e23f4c7511c Dong Bo 2018-01-30 2561 .label = "d9",
da5e23f4c7511c Dong Bo 2018-01-30 2562 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2563 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2564 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2565 },
da5e23f4c7511c Dong Bo 2018-01-30 2566 };
da5e23f4c7511c Dong Bo 2018-01-30 2567
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:OLK-5.10 12086/30000] drivers/rtc/rtc-mc146818-lib.c:213 mc146818_set_time() error: uninitialized symbol 'save_freq_select'.
by kernel test robot 29 Jan '24
by kernel test robot 29 Jan '24
29 Jan '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: bb2503a5fcdf7f51d403ab34440c497acef3b4e7
commit: 31dc30955fcffeb32c96420b91e3c05e2f4614eb [12086/30000] rtc: Fix set RTC time delay 500ms on some Zhaoxin SOCs
:::::: branch date: 5 hours ago
:::::: commit date: 1 year, 11 months ago
config: x86_64-randconfig-161-20240124 (attached as .config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
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/202401262043.WarePplV-lkp@intel.com/
smatch warnings:
drivers/rtc/rtc-mc146818-lib.c:213 mc146818_set_time() error: uninitialized symbol 'save_freq_select'.
vim +/save_freq_select +213 drivers/rtc/rtc-mc146818-lib.c
d6faca40f40b62 Arnd Bergmann 2016-06-01 210
d6faca40f40b62 Arnd Bergmann 2016-06-01 211 CMOS_WRITE(save_control, RTC_CONTROL);
31dc30955fcffe LeoLiu-oc 2022-02-23 212 if (follow_mc146818_divider_reset())
d6faca40f40b62 Arnd Bergmann 2016-06-01 @213 CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
:::::: The code at line 213 was first introduced by commit
:::::: d6faca40f40b62aca8ea8c29289c7bf7456172bb rtc: move mc146818 helper functions out-of-line
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Alexandre Belloni <alexandre.belloni(a)free-electrons.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:openEuler-1.0-LTS 3208/21577] kernel/trace/bpf_trace.c:1273:5: sparse: sparse: symbol 'bpf_event_notify' was not declared. Should it be static?
by kernel test robot 29 Jan '24
by kernel test robot 29 Jan '24
29 Jan '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 992b5fc139d3aa14b25613b06adee4bb9c110b28
commit: 00d0f1b149a5201c072e868915c76f909c11c38f [3208/21577] bpf: support raw tracepoints in modules
:::::: branch date: 7 hours ago
:::::: commit date: 4 years, 1 month ago
config: x86_64-randconfig-123-20240125 (attached as .config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (attached as 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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401262122.kgKexAjZ-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/trace/bpf_trace.c:1273:5: sparse: sparse: symbol 'bpf_event_notify' was not declared. Should it be static?
>> kernel/trace/bpf_trace.c:1312:12: sparse: sparse: symbol 'bpf_event_init' was not declared. Should it be static?
kernel/trace/bpf_trace.c:173:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got void *unsafe_ptr @@
kernel/trace/bpf_trace.c:173:14: sparse: expected void const volatile [noderef] __user *ptr
kernel/trace/bpf_trace.c:173:14: sparse: got void *unsafe_ptr
kernel/trace/bpf_trace.c:1273:5: warning: no previous prototype for function 'bpf_event_notify' [-Wmissing-prototypes]
1273 | int bpf_event_notify(struct notifier_block *nb, unsigned long op, void *module)
| ^
kernel/trace/bpf_trace.c:1273:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1273 | int bpf_event_notify(struct notifier_block *nb, unsigned long op, void *module)
| ^
| static
kernel/trace/bpf_trace.c:1312:12: warning: no previous prototype for function 'bpf_event_init' [-Wmissing-prototypes]
1312 | int __init bpf_event_init(void)
| ^
kernel/trace/bpf_trace.c:1312:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1312 | int __init bpf_event_init(void)
| ^
| static
2 warnings generated.
vim +/bpf_event_notify +1273 kernel/trace/bpf_trace.c
00d0f1b149a520 Matt Mullins 2019-02-19 1271
00d0f1b149a520 Matt Mullins 2019-02-19 1272 #ifdef CONFIG_MODULES
00d0f1b149a520 Matt Mullins 2019-02-19 @1273 int bpf_event_notify(struct notifier_block *nb, unsigned long op, void *module)
00d0f1b149a520 Matt Mullins 2019-02-19 1274 {
00d0f1b149a520 Matt Mullins 2019-02-19 1275 struct bpf_trace_module *btm, *tmp;
00d0f1b149a520 Matt Mullins 2019-02-19 1276 struct module *mod = module;
00d0f1b149a520 Matt Mullins 2019-02-19 1277
00d0f1b149a520 Matt Mullins 2019-02-19 1278 if (mod->num_bpf_raw_events == 0 ||
00d0f1b149a520 Matt Mullins 2019-02-19 1279 (op != MODULE_STATE_COMING && op != MODULE_STATE_GOING))
00d0f1b149a520 Matt Mullins 2019-02-19 1280 return 0;
00d0f1b149a520 Matt Mullins 2019-02-19 1281
00d0f1b149a520 Matt Mullins 2019-02-19 1282 mutex_lock(&bpf_module_mutex);
00d0f1b149a520 Matt Mullins 2019-02-19 1283
00d0f1b149a520 Matt Mullins 2019-02-19 1284 switch (op) {
00d0f1b149a520 Matt Mullins 2019-02-19 1285 case MODULE_STATE_COMING:
00d0f1b149a520 Matt Mullins 2019-02-19 1286 btm = kzalloc(sizeof(*btm), GFP_KERNEL);
00d0f1b149a520 Matt Mullins 2019-02-19 1287 if (btm) {
00d0f1b149a520 Matt Mullins 2019-02-19 1288 btm->module = module;
00d0f1b149a520 Matt Mullins 2019-02-19 1289 list_add(&btm->list, &bpf_trace_modules);
00d0f1b149a520 Matt Mullins 2019-02-19 1290 }
00d0f1b149a520 Matt Mullins 2019-02-19 1291 break;
00d0f1b149a520 Matt Mullins 2019-02-19 1292 case MODULE_STATE_GOING:
00d0f1b149a520 Matt Mullins 2019-02-19 1293 list_for_each_entry_safe(btm, tmp, &bpf_trace_modules, list) {
00d0f1b149a520 Matt Mullins 2019-02-19 1294 if (btm->module == module) {
00d0f1b149a520 Matt Mullins 2019-02-19 1295 list_del(&btm->list);
00d0f1b149a520 Matt Mullins 2019-02-19 1296 kfree(btm);
00d0f1b149a520 Matt Mullins 2019-02-19 1297 break;
00d0f1b149a520 Matt Mullins 2019-02-19 1298 }
00d0f1b149a520 Matt Mullins 2019-02-19 1299 }
00d0f1b149a520 Matt Mullins 2019-02-19 1300 break;
00d0f1b149a520 Matt Mullins 2019-02-19 1301 }
00d0f1b149a520 Matt Mullins 2019-02-19 1302
00d0f1b149a520 Matt Mullins 2019-02-19 1303 mutex_unlock(&bpf_module_mutex);
00d0f1b149a520 Matt Mullins 2019-02-19 1304
00d0f1b149a520 Matt Mullins 2019-02-19 1305 return 0;
00d0f1b149a520 Matt Mullins 2019-02-19 1306 }
00d0f1b149a520 Matt Mullins 2019-02-19 1307
00d0f1b149a520 Matt Mullins 2019-02-19 1308 static struct notifier_block bpf_module_nb = {
00d0f1b149a520 Matt Mullins 2019-02-19 1309 .notifier_call = bpf_event_notify,
00d0f1b149a520 Matt Mullins 2019-02-19 1310 };
00d0f1b149a520 Matt Mullins 2019-02-19 1311
00d0f1b149a520 Matt Mullins 2019-02-19 @1312 int __init bpf_event_init(void)
00d0f1b149a520 Matt Mullins 2019-02-19 1313 {
00d0f1b149a520 Matt Mullins 2019-02-19 1314 register_module_notifier(&bpf_module_nb);
00d0f1b149a520 Matt Mullins 2019-02-19 1315 return 0;
00d0f1b149a520 Matt Mullins 2019-02-19 1316 }
00d0f1b149a520 Matt Mullins 2019-02-19 1317
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:openEuler-1.0-LTS 4369/21577] drivers/scsi/sd.c:1222:32: sparse: sparse: incorrect type in return expression (different base types)
by kernel test robot 29 Jan '24
by kernel test robot 29 Jan '24
29 Jan '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 992b5fc139d3aa14b25613b06adee4bb9c110b28
commit: d597314e1e561e653a9dbeafec69f20d6b372af1 [4369/21577] scsi: sd: Protect against READ(6) or WRITE(6) with zero block transfer length
:::::: branch date: 7 hours ago
:::::: commit date: 4 years, 1 month ago
config: x86_64-randconfig-121-20240125 (attached as .config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (attached as 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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401262223.5mM2ZI39-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/sd.c:1222:32: sparse: sparse: incorrect type in return expression (different base types) @@ expected int @@ got restricted blk_status_t [usertype] @@
drivers/scsi/sd.c:1222:32: sparse: expected int
drivers/scsi/sd.c:1222:32: sparse: got restricted blk_status_t [usertype]
In file included from drivers/scsi/sd.c:46:
In file included from include/linux/blkdev.h:16:
include/linux/pagemap.h:401:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict]
401 | filler_t *filler = (filler_t *)mapping->a_ops->readpage;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +1222 drivers/scsi/sd.c
90467c294aba7f FUJITA Tomonori 2010-07-03 1019
87949eee7e1547 Christoph Hellwig 2014-06-28 1020 static int sd_setup_read_write_cmnd(struct scsi_cmnd *SCpnt)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1021 {
a1b73fc194e73e Christoph Hellwig 2014-05-01 1022 struct request *rq = SCpnt->request;
a1b73fc194e73e Christoph Hellwig 2014-05-01 1023 struct scsi_device *sdp = SCpnt->device;
776b23a0363d99 Christoph Hellwig 2006-01-06 1024 struct gendisk *disk = rq->rq_disk;
89d9475610771b Hannes Reinecke 2016-10-18 1025 struct scsi_disk *sdkp = scsi_disk(disk);
83096ebf1263b2 Tejun Heo 2009-05-07 1026 sector_t block = blk_rq_pos(rq);
18351070b86d15 Linus Torvalds 2008-08-05 1027 sector_t threshold;
83096ebf1263b2 Tejun Heo 2009-05-07 1028 unsigned int this_count = blk_rq_sectors(rq);
d597314e1e561e Bart Van Assche 2019-03-23 1029 unsigned int nr_blocks = sectors_to_logical(sdp, blk_rq_sectors(rq));
c611529e7cd346 Martin K. Petersen 2014-09-26 1030 unsigned int dif, dix;
c611529e7cd346 Martin K. Petersen 2014-09-26 1031 int ret;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1032 unsigned char protect;
7f9a6bc4e9d59e James Bottomley 2007-08-04 1033
3c356bde19e9a7 Christoph Hellwig 2014-09-05 1034 ret = scsi_init_io(SCpnt);
7f9a6bc4e9d59e James Bottomley 2007-08-04 1035 if (ret != BLKPREP_OK)
39051dd85f2870 Damien Le Moal 2017-12-21 1036 return ret;
0624cbb1e2e64a Bart Van Assche 2017-08-25 1037 WARN_ON_ONCE(SCpnt != rq->special);
7f9a6bc4e9d59e James Bottomley 2007-08-04 1038
7f9a6bc4e9d59e James Bottomley 2007-08-04 1039 /* from here on until we're complete, any goto out
7f9a6bc4e9d59e James Bottomley 2007-08-04 1040 * is used for a killable error condition */
7f9a6bc4e9d59e James Bottomley 2007-08-04 1041 ret = BLKPREP_KILL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1042
a1b73fc194e73e Christoph Hellwig 2014-05-01 1043 SCSI_LOG_HLQUEUE(1,
a1b73fc194e73e Christoph Hellwig 2014-05-01 1044 scmd_printk(KERN_INFO, SCpnt,
a1b73fc194e73e Christoph Hellwig 2014-05-01 1045 "%s: block=%llu, count=%d\n",
a1b73fc194e73e Christoph Hellwig 2014-05-01 1046 __func__, (unsigned long long)block, this_count));
^1da177e4c3f41 Linus Torvalds 2005-04-16 1047
^1da177e4c3f41 Linus Torvalds 2005-04-16 1048 if (!sdp || !scsi_device_online(sdp) ||
83096ebf1263b2 Tejun Heo 2009-05-07 1049 block + blk_rq_sectors(rq) > get_capacity(disk)) {
fa0d34be06213e Martin K. Petersen 2007-02-27 1050 SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt,
83096ebf1263b2 Tejun Heo 2009-05-07 1051 "Finishing %u sectors\n",
83096ebf1263b2 Tejun Heo 2009-05-07 1052 blk_rq_sectors(rq)));
fa0d34be06213e Martin K. Petersen 2007-02-27 1053 SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt,
fa0d34be06213e Martin K. Petersen 2007-02-27 1054 "Retry with 0x%p\n", SCpnt));
7f9a6bc4e9d59e James Bottomley 2007-08-04 1055 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1056 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1057
^1da177e4c3f41 Linus Torvalds 2005-04-16 1058 if (sdp->changed) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1059 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 1060 * quietly refuse to do anything to a changed disc until
^1da177e4c3f41 Linus Torvalds 2005-04-16 1061 * the changed bit has been reset
^1da177e4c3f41 Linus Torvalds 2005-04-16 1062 */
3ff5588d3f8afa Alan Stern 2010-09-07 1063 /* printk("SCSI disk has been changed or is not present. Prohibiting further I/O.\n"); */
7f9a6bc4e9d59e James Bottomley 2007-08-04 1064 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1065 }
7f9a6bc4e9d59e James Bottomley 2007-08-04 1066
a0899d4df534d2 Hans de Goede 2008-01-20 1067 /*
18351070b86d15 Linus Torvalds 2008-08-05 1068 * Some SD card readers can't handle multi-sector accesses which touch
18351070b86d15 Linus Torvalds 2008-08-05 1069 * the last one or two hardware sectors. Split accesses as needed.
a0899d4df534d2 Hans de Goede 2008-01-20 1070 */
18351070b86d15 Linus Torvalds 2008-08-05 1071 threshold = get_capacity(disk) - SD_LAST_BUGGY_SECTORS *
18351070b86d15 Linus Torvalds 2008-08-05 1072 (sdp->sector_size / 512);
18351070b86d15 Linus Torvalds 2008-08-05 1073
18351070b86d15 Linus Torvalds 2008-08-05 1074 if (unlikely(sdp->last_sector_bug && block + this_count > threshold)) {
18351070b86d15 Linus Torvalds 2008-08-05 1075 if (block < threshold) {
18351070b86d15 Linus Torvalds 2008-08-05 1076 /* Access up to the threshold but not beyond */
18351070b86d15 Linus Torvalds 2008-08-05 1077 this_count = threshold - block;
18351070b86d15 Linus Torvalds 2008-08-05 1078 } else {
18351070b86d15 Linus Torvalds 2008-08-05 1079 /* Access only a single hardware sector */
18351070b86d15 Linus Torvalds 2008-08-05 1080 this_count = sdp->sector_size / 512;
18351070b86d15 Linus Torvalds 2008-08-05 1081 }
18351070b86d15 Linus Torvalds 2008-08-05 1082 }
a0899d4df534d2 Hans de Goede 2008-01-20 1083
fa0d34be06213e Martin K. Petersen 2007-02-27 1084 SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt, "block=%llu\n",
fa0d34be06213e Martin K. Petersen 2007-02-27 1085 (unsigned long long)block));
^1da177e4c3f41 Linus Torvalds 2005-04-16 1086
^1da177e4c3f41 Linus Torvalds 2005-04-16 1087 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 1088 * If we have a 1K hardware sectorsize, prevent access to single
^1da177e4c3f41 Linus Torvalds 2005-04-16 1089 * 512 byte sectors. In theory we could handle this - in fact
^1da177e4c3f41 Linus Torvalds 2005-04-16 1090 * the scsi cdrom driver must be able to handle this because
^1da177e4c3f41 Linus Torvalds 2005-04-16 1091 * we typically use 1K blocksizes, and cdroms typically have
^1da177e4c3f41 Linus Torvalds 2005-04-16 1092 * 2K hardware sectorsizes. Of course, things are simpler
^1da177e4c3f41 Linus Torvalds 2005-04-16 1093 * with the cdrom, since it is read-only. For performance
^1da177e4c3f41 Linus Torvalds 2005-04-16 1094 * reasons, the filesystems should be able to handle this
^1da177e4c3f41 Linus Torvalds 2005-04-16 1095 * and not force the scsi disk driver to use bounce buffers
^1da177e4c3f41 Linus Torvalds 2005-04-16 1096 * for this.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1097 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1098 if (sdp->sector_size == 1024) {
83096ebf1263b2 Tejun Heo 2009-05-07 1099 if ((block & 1) || (blk_rq_sectors(rq) & 1)) {
e73aec8247032e Martin K. Petersen 2007-02-27 1100 scmd_printk(KERN_ERR, SCpnt,
e73aec8247032e Martin K. Petersen 2007-02-27 1101 "Bad block number requested\n");
7f9a6bc4e9d59e James Bottomley 2007-08-04 1102 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1103 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1104 block = block >> 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1105 this_count = this_count >> 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1106 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1107 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1108 if (sdp->sector_size == 2048) {
83096ebf1263b2 Tejun Heo 2009-05-07 1109 if ((block & 3) || (blk_rq_sectors(rq) & 3)) {
e73aec8247032e Martin K. Petersen 2007-02-27 1110 scmd_printk(KERN_ERR, SCpnt,
e73aec8247032e Martin K. Petersen 2007-02-27 1111 "Bad block number requested\n");
7f9a6bc4e9d59e James Bottomley 2007-08-04 1112 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1113 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1114 block = block >> 2;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1115 this_count = this_count >> 2;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1116 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1117 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1118 if (sdp->sector_size == 4096) {
83096ebf1263b2 Tejun Heo 2009-05-07 1119 if ((block & 7) || (blk_rq_sectors(rq) & 7)) {
e73aec8247032e Martin K. Petersen 2007-02-27 1120 scmd_printk(KERN_ERR, SCpnt,
e73aec8247032e Martin K. Petersen 2007-02-27 1121 "Bad block number requested\n");
7f9a6bc4e9d59e James Bottomley 2007-08-04 1122 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1123 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1124 block = block >> 3;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1125 this_count = this_count >> 3;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1126 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1127 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1128 if (rq_data_dir(rq) == WRITE) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1129 SCpnt->cmnd[0] = WRITE_6;
af55ff675a8461 Martin K. Petersen 2008-07-17 1130
8c579ab69d50a4 Martin K. Petersen 2012-08-28 1131 if (blk_integrity_rq(rq))
10c41ddd61323b Max Gurtovoy 2018-07-30 1132 t10_pi_prepare(SCpnt->request, sdkp->protection_type);
af55ff675a8461 Martin K. Petersen 2008-07-17 1133
^1da177e4c3f41 Linus Torvalds 2005-04-16 1134 } else if (rq_data_dir(rq) == READ) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1135 SCpnt->cmnd[0] = READ_6;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1136 } else {
ef295ecf090d3e Christoph Hellwig 2016-10-28 1137 scmd_printk(KERN_ERR, SCpnt, "Unknown command %d\n", req_op(rq));
7f9a6bc4e9d59e James Bottomley 2007-08-04 1138 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1139 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1140
fa0d34be06213e Martin K. Petersen 2007-02-27 1141 SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt,
83096ebf1263b2 Tejun Heo 2009-05-07 1142 "%s %d/%u 512 byte blocks.\n",
fa0d34be06213e Martin K. Petersen 2007-02-27 1143 (rq_data_dir(rq) == WRITE) ?
fa0d34be06213e Martin K. Petersen 2007-02-27 1144 "writing" : "reading", this_count,
83096ebf1263b2 Tejun Heo 2009-05-07 1145 blk_rq_sectors(rq)));
^1da177e4c3f41 Linus Torvalds 2005-04-16 1146
c611529e7cd346 Martin K. Petersen 2014-09-26 1147 dix = scsi_prot_sg_count(SCpnt);
c611529e7cd346 Martin K. Petersen 2014-09-26 1148 dif = scsi_host_dif_capable(SCpnt->device->host, sdkp->protection_type);
c611529e7cd346 Martin K. Petersen 2014-09-26 1149
c611529e7cd346 Martin K. Petersen 2014-09-26 1150 if (dif || dix)
c611529e7cd346 Martin K. Petersen 2014-09-26 1151 protect = sd_setup_protect_cmnd(SCpnt, dix, dif);
af55ff675a8461 Martin K. Petersen 2008-07-17 1152 else
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1153 protect = 0;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1154
8475c8118551f8 Christoph Hellwig 2016-09-11 1155 if (protect && sdkp->protection_type == T10_PI_TYPE2_PROTECTION) {
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1156 SCpnt->cmnd = mempool_alloc(sd_cdb_pool, GFP_ATOMIC);
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1157
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1158 if (unlikely(SCpnt->cmnd == NULL)) {
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1159 ret = BLKPREP_DEFER;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1160 goto out;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1161 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1162
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1163 SCpnt->cmd_len = SD_EXT_CDB_SIZE;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1164 memset(SCpnt->cmnd, 0, SCpnt->cmd_len);
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1165 SCpnt->cmnd[0] = VARIABLE_LENGTH_CMD;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1166 SCpnt->cmnd[7] = 0x18;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1167 SCpnt->cmnd[9] = (rq_data_dir(rq) == READ) ? READ_32 : WRITE_32;
33659ebbae2622 Christoph Hellwig 2010-08-07 1168 SCpnt->cmnd[10] = protect | ((rq->cmd_flags & REQ_FUA) ? 0x8 : 0);
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1169
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1170 /* LBA */
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1171 SCpnt->cmnd[12] = sizeof(block) > 4 ? (unsigned char) (block >> 56) & 0xff : 0;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1172 SCpnt->cmnd[13] = sizeof(block) > 4 ? (unsigned char) (block >> 48) & 0xff : 0;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1173 SCpnt->cmnd[14] = sizeof(block) > 4 ? (unsigned char) (block >> 40) & 0xff : 0;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1174 SCpnt->cmnd[15] = sizeof(block) > 4 ? (unsigned char) (block >> 32) & 0xff : 0;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1175 SCpnt->cmnd[16] = (unsigned char) (block >> 24) & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1176 SCpnt->cmnd[17] = (unsigned char) (block >> 16) & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1177 SCpnt->cmnd[18] = (unsigned char) (block >> 8) & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1178 SCpnt->cmnd[19] = (unsigned char) block & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1179
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1180 /* Expected Indirect LBA */
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1181 SCpnt->cmnd[20] = (unsigned char) (block >> 24) & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1182 SCpnt->cmnd[21] = (unsigned char) (block >> 16) & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1183 SCpnt->cmnd[22] = (unsigned char) (block >> 8) & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1184 SCpnt->cmnd[23] = (unsigned char) block & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1185
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1186 /* Transfer length */
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1187 SCpnt->cmnd[28] = (unsigned char) (this_count >> 24) & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1188 SCpnt->cmnd[29] = (unsigned char) (this_count >> 16) & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1189 SCpnt->cmnd[30] = (unsigned char) (this_count >> 8) & 0xff;
4e7392ec582cf0 Martin K. Petersen 2009-09-20 1190 SCpnt->cmnd[31] = (unsigned char) this_count & 0xff;
e430cbc8bbd779 Akinobu Mita 2014-06-02 1191 } else if (sdp->use_16_for_rw || (this_count > 0xffff)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1192 SCpnt->cmnd[0] += READ_16 - READ_6;
33659ebbae2622 Christoph Hellwig 2010-08-07 1193 SCpnt->cmnd[1] = protect | ((rq->cmd_flags & REQ_FUA) ? 0x8 : 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1194 SCpnt->cmnd[2] = sizeof(block) > 4 ? (unsigned char) (block >> 56) & 0xff : 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1195 SCpnt->cmnd[3] = sizeof(block) > 4 ? (unsigned char) (block >> 48) & 0xff : 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1196 SCpnt->cmnd[4] = sizeof(block) > 4 ? (unsigned char) (block >> 40) & 0xff : 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1197 SCpnt->cmnd[5] = sizeof(block) > 4 ? (unsigned char) (block >> 32) & 0xff : 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1198 SCpnt->cmnd[6] = (unsigned char) (block >> 24) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1199 SCpnt->cmnd[7] = (unsigned char) (block >> 16) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1200 SCpnt->cmnd[8] = (unsigned char) (block >> 8) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1201 SCpnt->cmnd[9] = (unsigned char) block & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1202 SCpnt->cmnd[10] = (unsigned char) (this_count >> 24) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1203 SCpnt->cmnd[11] = (unsigned char) (this_count >> 16) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1204 SCpnt->cmnd[12] = (unsigned char) (this_count >> 8) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1205 SCpnt->cmnd[13] = (unsigned char) this_count & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1206 SCpnt->cmnd[14] = SCpnt->cmnd[15] = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1207 } else if ((this_count > 0xff) || (block > 0x1fffff) ||
af55ff675a8461 Martin K. Petersen 2008-07-17 1208 scsi_device_protection(SCpnt->device) ||
^1da177e4c3f41 Linus Torvalds 2005-04-16 1209 SCpnt->device->use_10_for_rw) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1210 SCpnt->cmnd[0] += READ_10 - READ_6;
33659ebbae2622 Christoph Hellwig 2010-08-07 1211 SCpnt->cmnd[1] = protect | ((rq->cmd_flags & REQ_FUA) ? 0x8 : 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1212 SCpnt->cmnd[2] = (unsigned char) (block >> 24) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1213 SCpnt->cmnd[3] = (unsigned char) (block >> 16) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1214 SCpnt->cmnd[4] = (unsigned char) (block >> 8) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1215 SCpnt->cmnd[5] = (unsigned char) block & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1216 SCpnt->cmnd[6] = SCpnt->cmnd[9] = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1217 SCpnt->cmnd[7] = (unsigned char) (this_count >> 8) & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1218 SCpnt->cmnd[8] = (unsigned char) this_count & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1219 } else {
d597314e1e561e Bart Van Assche 2019-03-23 1220 /* Avoid that 0 blocks gets translated into 256 blocks. */
d597314e1e561e Bart Van Assche 2019-03-23 1221 if (WARN_ON_ONCE(nr_blocks == 0))
d597314e1e561e Bart Van Assche 2019-03-23 @1222 return BLK_STS_IOERR;
d597314e1e561e Bart Van Assche 2019-03-23 1223
33659ebbae2622 Christoph Hellwig 2010-08-07 1224 if (unlikely(rq->cmd_flags & REQ_FUA)) {
007365ad60387d Tejun Heo 2006-01-06 1225 /*
007365ad60387d Tejun Heo 2006-01-06 1226 * This happens only if this drive failed
007365ad60387d Tejun Heo 2006-01-06 1227 * 10byte rw command with ILLEGAL_REQUEST
007365ad60387d Tejun Heo 2006-01-06 1228 * during operation and thus turned off
007365ad60387d Tejun Heo 2006-01-06 1229 * use_10_for_rw.
007365ad60387d Tejun Heo 2006-01-06 1230 */
e73aec8247032e Martin K. Petersen 2007-02-27 1231 scmd_printk(KERN_ERR, SCpnt,
e73aec8247032e Martin K. Petersen 2007-02-27 1232 "FUA write on READ/WRITE(6) drive\n");
7f9a6bc4e9d59e James Bottomley 2007-08-04 1233 goto out;
007365ad60387d Tejun Heo 2006-01-06 1234 }
007365ad60387d Tejun Heo 2006-01-06 1235
^1da177e4c3f41 Linus Torvalds 2005-04-16 1236 SCpnt->cmnd[1] |= (unsigned char) ((block >> 16) & 0x1f);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1237 SCpnt->cmnd[2] = (unsigned char) ((block >> 8) & 0xff);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1238 SCpnt->cmnd[3] = (unsigned char) block & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1239 SCpnt->cmnd[4] = (unsigned char) this_count;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1240 SCpnt->cmnd[5] = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1241 }
30b0c37b27485a Boaz Harrosh 2007-12-13 1242 SCpnt->sdb.length = this_count * sdp->sector_size;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1243
^1da177e4c3f41 Linus Torvalds 2005-04-16 1244 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 1245 * We shouldn't disconnect in the middle of a sector, so with a dumb
^1da177e4c3f41 Linus Torvalds 2005-04-16 1246 * host adapter, it's safe to assume that we can at least transfer
^1da177e4c3f41 Linus Torvalds 2005-04-16 1247 * this many bytes between each connect / disconnect.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1248 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1249 SCpnt->transfersize = sdp->sector_size;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1250 SCpnt->underflow = this_count << 9;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1251 SCpnt->allowed = SD_MAX_RETRIES;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1252
^1da177e4c3f41 Linus Torvalds 2005-04-16 1253 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 1254 * This indicates that the command is ready from our end to be
^1da177e4c3f41 Linus Torvalds 2005-04-16 1255 * queued.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1256 */
7f9a6bc4e9d59e James Bottomley 2007-08-04 1257 ret = BLKPREP_OK;
7f9a6bc4e9d59e James Bottomley 2007-08-04 1258 out:
a1b73fc194e73e Christoph Hellwig 2014-05-01 1259 return ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1260 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1261
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:openEuler-1.0-LTS 1581/21579] drivers/pci/probe.c:2223:3: sparse: sparse: symbol 'skip_1620_bus_num' was not declared. Should it be static?
by kernel test robot 29 Jan '24
by kernel test robot 29 Jan '24
29 Jan '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: acf72db532a7791fde53af3dc7b4d0a6adcf6eff
commit: da5e23f4c7511cbc1a199bb4d5d5477e191dc26c [1581/21579] Hi1620 CS FPGA PCIe Skip Bus
:::::: branch date: 2 days ago
:::::: commit date: 4 years, 1 month ago
config: x86_64-randconfig-121-20240125 (attached as .config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (attached as 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(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401290427.eM9fDHDi-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/pci/probe.c:2223:3: sparse: sparse: symbol 'skip_1620_bus_num' was not declared. Should it be static?
drivers/pci/probe.c:448:21: sparse: sparse: self-comparison always evaluates to false
vim +/skip_1620_bus_num +2223 drivers/pci/probe.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 2214
da5e23f4c7511c Dong Bo 2018-01-30 2215 static int skip_bus_flag = 0;
da5e23f4c7511c Dong Bo 2018-01-30 2216 #define HOSTBRIGE_1620_NUM 48
da5e23f4c7511c Dong Bo 2018-01-30 2217 struct skip_bus_num {
da5e23f4c7511c Dong Bo 2018-01-30 2218 char module_name[32];
da5e23f4c7511c Dong Bo 2018-01-30 2219 char label[4];
da5e23f4c7511c Dong Bo 2018-01-30 2220 int bus_num;
da5e23f4c7511c Dong Bo 2018-01-30 2221 int dev_num;
da5e23f4c7511c Dong Bo 2018-01-30 2222 int skip;
da5e23f4c7511c Dong Bo 2018-01-30 @2223 } skip_1620_bus_num[HOSTBRIGE_1620_NUM] = {
da5e23f4c7511c Dong Bo 2018-01-30 2224 /*chip 0*/
da5e23f4c7511c Dong Bo 2018-01-30 2225 {
da5e23f4c7511c Dong Bo 2018-01-30 2226 .module_name = "chip0_pcie",
da5e23f4c7511c Dong Bo 2018-01-30 2227 .label = "a0",
da5e23f4c7511c Dong Bo 2018-01-30 2228 .bus_num = 0,
da5e23f4c7511c Dong Bo 2018-01-30 2229 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2230 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2231 },
da5e23f4c7511c Dong Bo 2018-01-30 2232 {
da5e23f4c7511c Dong Bo 2018-01-30 2233 .module_name = "chip0_pcie_dma",
da5e23f4c7511c Dong Bo 2018-01-30 2234 .label = "a1",
da5e23f4c7511c Dong Bo 2018-01-30 2235 .bus_num = 0x7b,
da5e23f4c7511c Dong Bo 2018-01-30 2236 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2237 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2238 },
da5e23f4c7511c Dong Bo 2018-01-30 2239 {
da5e23f4c7511c Dong Bo 2018-01-30 2240 .module_name = "chip0_pcie_sdi",
da5e23f4c7511c Dong Bo 2018-01-30 2241 .label = "a2",
da5e23f4c7511c Dong Bo 2018-01-30 2242 .bus_num = 0x7b,
da5e23f4c7511c Dong Bo 2018-01-30 2243 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2244 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2245 },
da5e23f4c7511c Dong Bo 2018-01-30 2246 {
da5e23f4c7511c Dong Bo 2018-01-30 2247 .module_name = "chip0_USB",
da5e23f4c7511c Dong Bo 2018-01-30 2248 .label = "a3",
da5e23f4c7511c Dong Bo 2018-01-30 2249 .bus_num = 0x7a,
da5e23f4c7511c Dong Bo 2018-01-30 2250 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2251 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2252 },
da5e23f4c7511c Dong Bo 2018-01-30 2253 {
da5e23f4c7511c Dong Bo 2018-01-30 2254 .module_name = "chip0_hpre",
da5e23f4c7511c Dong Bo 2018-01-30 2255 .label = "a4",
da5e23f4c7511c Dong Bo 2018-01-30 2256 .bus_num = 0x78,
da5e23f4c7511c Dong Bo 2018-01-30 2257 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2258 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2259 },
da5e23f4c7511c Dong Bo 2018-01-30 2260 {
da5e23f4c7511c Dong Bo 2018-01-30 2261 .module_name = "chip0_rde",
da5e23f4c7511c Dong Bo 2018-01-30 2262 .label = "a5",
da5e23f4c7511c Dong Bo 2018-01-30 2263 .bus_num = 0x78,
da5e23f4c7511c Dong Bo 2018-01-30 2264 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2265 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2266 },
da5e23f4c7511c Dong Bo 2018-01-30 2267 {
da5e23f4c7511c Dong Bo 2018-01-30 2268 .module_name = "chip0_nic",
da5e23f4c7511c Dong Bo 2018-01-30 2269 .label = "aa",
da5e23f4c7511c Dong Bo 2018-01-30 2270 .bus_num = 0x7c,
da5e23f4c7511c Dong Bo 2018-01-30 2271 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2272 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2273 },
da5e23f4c7511c Dong Bo 2018-01-30 2274 {
da5e23f4c7511c Dong Bo 2018-01-30 2275 .module_name = "chip0_sas",
da5e23f4c7511c Dong Bo 2018-01-30 2276 .label = "a6",
da5e23f4c7511c Dong Bo 2018-01-30 2277 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2278 .dev_num = 0x02,
da5e23f4c7511c Dong Bo 2018-01-30 2279 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2280 },
da5e23f4c7511c Dong Bo 2018-01-30 2281 {
da5e23f4c7511c Dong Bo 2018-01-30 2282 .module_name = "chip0_sas1",
da5e23f4c7511c Dong Bo 2018-01-30 2283 .label = "ab",
da5e23f4c7511c Dong Bo 2018-01-30 2284 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2285 .dev_num = 0x04,
da5e23f4c7511c Dong Bo 2018-01-30 2286 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2287 },
da5e23f4c7511c Dong Bo 2018-01-30 2288 {
da5e23f4c7511c Dong Bo 2018-01-30 2289 .module_name = "chip0_sata",
da5e23f4c7511c Dong Bo 2018-01-30 2290 .label = "a7",
da5e23f4c7511c Dong Bo 2018-01-30 2291 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2292 .dev_num = 0x03,
da5e23f4c7511c Dong Bo 2018-01-30 2293 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2294 },
da5e23f4c7511c Dong Bo 2018-01-30 2295 {
da5e23f4c7511c Dong Bo 2018-01-30 2296 .module_name = "chip0_zip",
da5e23f4c7511c Dong Bo 2018-01-30 2297 .label = "a8",
da5e23f4c7511c Dong Bo 2018-01-30 2298 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2299 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2300 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2301 },
da5e23f4c7511c Dong Bo 2018-01-30 2302 {
da5e23f4c7511c Dong Bo 2018-01-30 2303 .module_name = "chip0_sec",
da5e23f4c7511c Dong Bo 2018-01-30 2304 .label = "a9",
da5e23f4c7511c Dong Bo 2018-01-30 2305 .bus_num = 0x74,
da5e23f4c7511c Dong Bo 2018-01-30 2306 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2307 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2308 },
da5e23f4c7511c Dong Bo 2018-01-30 2309 /*chip 1*/
da5e23f4c7511c Dong Bo 2018-01-30 2310 {
da5e23f4c7511c Dong Bo 2018-01-30 2311 .module_name = "chip1_pcie",
da5e23f4c7511c Dong Bo 2018-01-30 2312 .label = "b0",
da5e23f4c7511c Dong Bo 2018-01-30 2313 .bus_num = 0x80,
da5e23f4c7511c Dong Bo 2018-01-30 2314 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2315 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2316 },
da5e23f4c7511c Dong Bo 2018-01-30 2317 {
da5e23f4c7511c Dong Bo 2018-01-30 2318 .module_name = "chip1_pcie_dma",
da5e23f4c7511c Dong Bo 2018-01-30 2319 .label = "b1",
da5e23f4c7511c Dong Bo 2018-01-30 2320 .bus_num = 0xbb,
da5e23f4c7511c Dong Bo 2018-01-30 2321 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2322 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2323 },
da5e23f4c7511c Dong Bo 2018-01-30 2324 {
da5e23f4c7511c Dong Bo 2018-01-30 2325 .module_name = "chip1_pcie_sdi",
da5e23f4c7511c Dong Bo 2018-01-30 2326 .label = "b2",
da5e23f4c7511c Dong Bo 2018-01-30 2327 .bus_num = 0xbb,
da5e23f4c7511c Dong Bo 2018-01-30 2328 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2329 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2330 },
da5e23f4c7511c Dong Bo 2018-01-30 2331 {
da5e23f4c7511c Dong Bo 2018-01-30 2332 .module_name = "chip1_USB",
da5e23f4c7511c Dong Bo 2018-01-30 2333 .label = "b3",
da5e23f4c7511c Dong Bo 2018-01-30 2334 .bus_num = 0xba,
da5e23f4c7511c Dong Bo 2018-01-30 2335 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2336 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2337 },
da5e23f4c7511c Dong Bo 2018-01-30 2338 {
da5e23f4c7511c Dong Bo 2018-01-30 2339 .module_name = "chip1_hpre",
da5e23f4c7511c Dong Bo 2018-01-30 2340 .label = "b4",
da5e23f4c7511c Dong Bo 2018-01-30 2341 .bus_num = 0xb8,
da5e23f4c7511c Dong Bo 2018-01-30 2342 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2343 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2344 },
da5e23f4c7511c Dong Bo 2018-01-30 2345 {
da5e23f4c7511c Dong Bo 2018-01-30 2346 .module_name = "chip1_rde",
da5e23f4c7511c Dong Bo 2018-01-30 2347 .label = "b5",
da5e23f4c7511c Dong Bo 2018-01-30 2348 .bus_num = 0xb8,
da5e23f4c7511c Dong Bo 2018-01-30 2349 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2350 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2351 },
da5e23f4c7511c Dong Bo 2018-01-30 2352 {
da5e23f4c7511c Dong Bo 2018-01-30 2353 .module_name = "chip1_nic",
da5e23f4c7511c Dong Bo 2018-01-30 2354 .label = "ba",
da5e23f4c7511c Dong Bo 2018-01-30 2355 .bus_num = 0xbc,
da5e23f4c7511c Dong Bo 2018-01-30 2356 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2357 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2358 },
da5e23f4c7511c Dong Bo 2018-01-30 2359 {
da5e23f4c7511c Dong Bo 2018-01-30 2360 .module_name = "chip1_sas",
da5e23f4c7511c Dong Bo 2018-01-30 2361 .label = "b6",
da5e23f4c7511c Dong Bo 2018-01-30 2362 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2363 .dev_num = 0x02,
da5e23f4c7511c Dong Bo 2018-01-30 2364 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2365 },
da5e23f4c7511c Dong Bo 2018-01-30 2366 {
da5e23f4c7511c Dong Bo 2018-01-30 2367 .module_name = "chip1_sas1",
da5e23f4c7511c Dong Bo 2018-01-30 2368 .label = "bb",
da5e23f4c7511c Dong Bo 2018-01-30 2369 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2370 .dev_num = 0x04,
da5e23f4c7511c Dong Bo 2018-01-30 2371 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2372 },
da5e23f4c7511c Dong Bo 2018-01-30 2373 {
da5e23f4c7511c Dong Bo 2018-01-30 2374 .module_name = "chip1_sata",
da5e23f4c7511c Dong Bo 2018-01-30 2375 .label = "b7",
da5e23f4c7511c Dong Bo 2018-01-30 2376 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2377 .dev_num = 0x03,
da5e23f4c7511c Dong Bo 2018-01-30 2378 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2379 },
da5e23f4c7511c Dong Bo 2018-01-30 2380 {
da5e23f4c7511c Dong Bo 2018-01-30 2381 .module_name = "chip1_zip",
da5e23f4c7511c Dong Bo 2018-01-30 2382 .label = "b8",
da5e23f4c7511c Dong Bo 2018-01-30 2383 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2384 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2385 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2386 },
da5e23f4c7511c Dong Bo 2018-01-30 2387 {
da5e23f4c7511c Dong Bo 2018-01-30 2388 .module_name = "chip0_sec",
da5e23f4c7511c Dong Bo 2018-01-30 2389 .label = "b9",
da5e23f4c7511c Dong Bo 2018-01-30 2390 .bus_num = 0xb4,
da5e23f4c7511c Dong Bo 2018-01-30 2391 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2392 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2393 },
da5e23f4c7511c Dong Bo 2018-01-30 2394
da5e23f4c7511c Dong Bo 2018-01-30 2395 /*chip 2*/
da5e23f4c7511c Dong Bo 2018-01-30 2396 {
da5e23f4c7511c Dong Bo 2018-01-30 2397 .module_name = "chip2_pcie",
da5e23f4c7511c Dong Bo 2018-01-30 2398 .label = "c0",
da5e23f4c7511c Dong Bo 2018-01-30 2399 .bus_num = 0xc0,
da5e23f4c7511c Dong Bo 2018-01-30 2400 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2401 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2402 },
da5e23f4c7511c Dong Bo 2018-01-30 2403 {
da5e23f4c7511c Dong Bo 2018-01-30 2404 .module_name = "chip2_pcie_dma",
da5e23f4c7511c Dong Bo 2018-01-30 2405 .label = "c1",
da5e23f4c7511c Dong Bo 2018-01-30 2406 .bus_num = 0xdb,
da5e23f4c7511c Dong Bo 2018-01-30 2407 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2408 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2409 },
da5e23f4c7511c Dong Bo 2018-01-30 2410 {
da5e23f4c7511c Dong Bo 2018-01-30 2411 .module_name = "chip2_pcie_sdi",
da5e23f4c7511c Dong Bo 2018-01-30 2412 .label = "c2",
da5e23f4c7511c Dong Bo 2018-01-30 2413 .bus_num = 0xdb,
da5e23f4c7511c Dong Bo 2018-01-30 2414 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2415 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2416 },
da5e23f4c7511c Dong Bo 2018-01-30 2417 {
da5e23f4c7511c Dong Bo 2018-01-30 2418 .module_name = "chip2_USB",
da5e23f4c7511c Dong Bo 2018-01-30 2419 .label = "c3",
da5e23f4c7511c Dong Bo 2018-01-30 2420 .bus_num = 0xda,
da5e23f4c7511c Dong Bo 2018-01-30 2421 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2422 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2423 },
da5e23f4c7511c Dong Bo 2018-01-30 2424 {
da5e23f4c7511c Dong Bo 2018-01-30 2425 .module_name = "chip2_hpre",
da5e23f4c7511c Dong Bo 2018-01-30 2426 .label = "c4",
da5e23f4c7511c Dong Bo 2018-01-30 2427 .bus_num = 0xd8,
da5e23f4c7511c Dong Bo 2018-01-30 2428 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2429 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2430 },
da5e23f4c7511c Dong Bo 2018-01-30 2431 {
da5e23f4c7511c Dong Bo 2018-01-30 2432 .module_name = "chip2_rde",
da5e23f4c7511c Dong Bo 2018-01-30 2433 .label = "c5",
da5e23f4c7511c Dong Bo 2018-01-30 2434 .bus_num = 0xd8,
da5e23f4c7511c Dong Bo 2018-01-30 2435 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2436 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2437 },
da5e23f4c7511c Dong Bo 2018-01-30 2438 {
da5e23f4c7511c Dong Bo 2018-01-30 2439 .module_name = "chip2_nic",
da5e23f4c7511c Dong Bo 2018-01-30 2440 .label = "ca",
da5e23f4c7511c Dong Bo 2018-01-30 2441 .bus_num = 0xdc,
da5e23f4c7511c Dong Bo 2018-01-30 2442 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2443 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2444 },
da5e23f4c7511c Dong Bo 2018-01-30 2445 {
da5e23f4c7511c Dong Bo 2018-01-30 2446 .module_name = "chip2_sas",
da5e23f4c7511c Dong Bo 2018-01-30 2447 .label = "c6",
da5e23f4c7511c Dong Bo 2018-01-30 2448 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2449 .dev_num = 0x02,
da5e23f4c7511c Dong Bo 2018-01-30 2450 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2451 },
da5e23f4c7511c Dong Bo 2018-01-30 2452 {
da5e23f4c7511c Dong Bo 2018-01-30 2453 .module_name = "chip2_sas1",
da5e23f4c7511c Dong Bo 2018-01-30 2454 .label = "cb",
da5e23f4c7511c Dong Bo 2018-01-30 2455 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2456 .dev_num = 0x04,
da5e23f4c7511c Dong Bo 2018-01-30 2457 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2458 },
da5e23f4c7511c Dong Bo 2018-01-30 2459 {
da5e23f4c7511c Dong Bo 2018-01-30 2460 .module_name = "chip2_sata",
da5e23f4c7511c Dong Bo 2018-01-30 2461 .label = "c7",
da5e23f4c7511c Dong Bo 2018-01-30 2462 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2463 .dev_num = 0x03,
da5e23f4c7511c Dong Bo 2018-01-30 2464 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2465 },
da5e23f4c7511c Dong Bo 2018-01-30 2466 {
da5e23f4c7511c Dong Bo 2018-01-30 2467 .module_name = "chip2_zip",
da5e23f4c7511c Dong Bo 2018-01-30 2468 .label = "c8",
da5e23f4c7511c Dong Bo 2018-01-30 2469 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2470 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2471 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2472 },
da5e23f4c7511c Dong Bo 2018-01-30 2473 {
da5e23f4c7511c Dong Bo 2018-01-30 2474 .module_name = "chip2_sec",
da5e23f4c7511c Dong Bo 2018-01-30 2475 .label = "c9",
da5e23f4c7511c Dong Bo 2018-01-30 2476 .bus_num = 0xd4,
da5e23f4c7511c Dong Bo 2018-01-30 2477 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2478 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2479 },
da5e23f4c7511c Dong Bo 2018-01-30 2480
da5e23f4c7511c Dong Bo 2018-01-30 2481 /*chip 3*/
da5e23f4c7511c Dong Bo 2018-01-30 2482 {
da5e23f4c7511c Dong Bo 2018-01-30 2483 .module_name = "chip3_pcie",
da5e23f4c7511c Dong Bo 2018-01-30 2484 .label = "d0",
da5e23f4c7511c Dong Bo 2018-01-30 2485 .bus_num = 0xe0,
da5e23f4c7511c Dong Bo 2018-01-30 2486 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2487 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2488 },
da5e23f4c7511c Dong Bo 2018-01-30 2489 {
da5e23f4c7511c Dong Bo 2018-01-30 2490 .module_name = "chip3_pcie_dma",
da5e23f4c7511c Dong Bo 2018-01-30 2491 .label = "d1",
da5e23f4c7511c Dong Bo 2018-01-30 2492 .bus_num = 0xfb,
da5e23f4c7511c Dong Bo 2018-01-30 2493 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2494 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2495 },
da5e23f4c7511c Dong Bo 2018-01-30 2496 {
da5e23f4c7511c Dong Bo 2018-01-30 2497 .module_name = "chip3_pcie_sdi",
da5e23f4c7511c Dong Bo 2018-01-30 2498 .label = "d2",
da5e23f4c7511c Dong Bo 2018-01-30 2499 .bus_num = 0xfb,
da5e23f4c7511c Dong Bo 2018-01-30 2500 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2501 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2502 },
da5e23f4c7511c Dong Bo 2018-01-30 2503 {
da5e23f4c7511c Dong Bo 2018-01-30 2504 .module_name = "chip3_USB",
da5e23f4c7511c Dong Bo 2018-01-30 2505 .label = "d3",
da5e23f4c7511c Dong Bo 2018-01-30 2506 .bus_num = 0xfa,
da5e23f4c7511c Dong Bo 2018-01-30 2507 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2508 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2509 },
da5e23f4c7511c Dong Bo 2018-01-30 2510 {
da5e23f4c7511c Dong Bo 2018-01-30 2511 .module_name = "chip3_hpre",
da5e23f4c7511c Dong Bo 2018-01-30 2512 .label = "d4",
da5e23f4c7511c Dong Bo 2018-01-30 2513 .bus_num = 0xf8,
da5e23f4c7511c Dong Bo 2018-01-30 2514 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2515 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2516 },
da5e23f4c7511c Dong Bo 2018-01-30 2517 {
da5e23f4c7511c Dong Bo 2018-01-30 2518 .module_name = "chip3_rde",
da5e23f4c7511c Dong Bo 2018-01-30 2519 .label = "d5",
da5e23f4c7511c Dong Bo 2018-01-30 2520 .bus_num = 0xf8,
da5e23f4c7511c Dong Bo 2018-01-30 2521 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2522 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2523 },
da5e23f4c7511c Dong Bo 2018-01-30 2524 {
da5e23f4c7511c Dong Bo 2018-01-30 2525 .module_name = "chip3_nic",
da5e23f4c7511c Dong Bo 2018-01-30 2526 .label = "da",
da5e23f4c7511c Dong Bo 2018-01-30 2527 .bus_num = 0xfc,
da5e23f4c7511c Dong Bo 2018-01-30 2528 .dev_num = 0xff,
da5e23f4c7511c Dong Bo 2018-01-30 2529 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2530 },
da5e23f4c7511c Dong Bo 2018-01-30 2531 {
da5e23f4c7511c Dong Bo 2018-01-30 2532 .module_name = "chip3_sas",
da5e23f4c7511c Dong Bo 2018-01-30 2533 .label = "d6",
da5e23f4c7511c Dong Bo 2018-01-30 2534 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2535 .dev_num = 0x02,
da5e23f4c7511c Dong Bo 2018-01-30 2536 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2537 },
da5e23f4c7511c Dong Bo 2018-01-30 2538 {
da5e23f4c7511c Dong Bo 2018-01-30 2539 .module_name = "chip3_sas1",
da5e23f4c7511c Dong Bo 2018-01-30 2540 .label = "db",
da5e23f4c7511c Dong Bo 2018-01-30 2541 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2542 .dev_num = 0x04,
da5e23f4c7511c Dong Bo 2018-01-30 2543 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2544 },
da5e23f4c7511c Dong Bo 2018-01-30 2545 {
da5e23f4c7511c Dong Bo 2018-01-30 2546 .module_name = "chip3_sata",
da5e23f4c7511c Dong Bo 2018-01-30 2547 .label = "d7",
da5e23f4c7511c Dong Bo 2018-01-30 2548 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2549 .dev_num = 0x03,
da5e23f4c7511c Dong Bo 2018-01-30 2550 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2551 },
da5e23f4c7511c Dong Bo 2018-01-30 2552 {
da5e23f4c7511c Dong Bo 2018-01-30 2553 .module_name = "chip3_zip",
da5e23f4c7511c Dong Bo 2018-01-30 2554 .label = "d8",
da5e23f4c7511c Dong Bo 2018-01-30 2555 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2556 .dev_num = 0x0,
da5e23f4c7511c Dong Bo 2018-01-30 2557 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2558 },
da5e23f4c7511c Dong Bo 2018-01-30 2559 {
da5e23f4c7511c Dong Bo 2018-01-30 2560 .module_name = "chip3_sec",
da5e23f4c7511c Dong Bo 2018-01-30 2561 .label = "d9",
da5e23f4c7511c Dong Bo 2018-01-30 2562 .bus_num = 0xf4,
da5e23f4c7511c Dong Bo 2018-01-30 2563 .dev_num = 0x1,
da5e23f4c7511c Dong Bo 2018-01-30 2564 .skip = 0
da5e23f4c7511c Dong Bo 2018-01-30 2565 },
da5e23f4c7511c Dong Bo 2018-01-30 2566 };
da5e23f4c7511c Dong Bo 2018-01-30 2567
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0
KABI reservation for IMA and crypto module.
v3:
Reserve one more u64 for crypto related structs.
v2:
Changed reservation ordering, and more reservation.
GUO Zihua (2):
crypto: kabi: KABI reservation for crypto
ima: kabi: KABI reservation for IMA
include/crypto/aead.h | 7 +++++++
include/crypto/akcipher.h | 7 +++++++
include/crypto/algapi.h | 7 +++++++
include/crypto/cryptd.h | 3 +++
include/crypto/hash.h | 9 +++++++++
include/crypto/if_alg.h | 9 +++++++++
include/crypto/public_key.h | 5 +++++
include/crypto/rng.h | 5 +++++
include/crypto/skcipher.h | 7 +++++++
include/linux/crypto.h | 5 +++++
include/linux/fs.h | 5 +++++
include/linux/kernel_read_file.h | 3 +++
include/linux/kexec.h | 5 +++++
include/linux/user_namespace.h | 3 +++
14 files changed, 80 insertions(+)
--
2.34.1
1
2

29 Jan '24
hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8ZE0I
CVE: NA
---------------------------------
There is softlockup under fio pressure test with smmu enabled:
watchdog: BUG: soft lockup - CPU#81 stuck for 22s! [swapper/81:0]
...
Call trace:
fq_flush_timeout+0xc0/0x110
call_timer_fn+0x34/0x178
expire_timers+0xec/0x158
run_timer_softirq+0xc0/0x1f8
__do_softirq+0x120/0x324
irq_exit+0x11c/0x140
__handle_domain_irq+0x6c/0xc0
gic_handle_irq+0x6c/0x170
el1_irq+0xb8/0x140
arch_cpu_idle+0x38/0x1c0
default_idle_call+0x24/0x44
do_idle+0x1f4/0x2d8
cpu_startup_entry+0x2c/0x30
secondary_start_kernel+0x17c/0x1c8
This is because the timer callback fq_flush_timeout may run more than
10ms, and timer may be processed continuously in the softirq so trigger
softlockup. We can use work to deal with fq_ring_free for each cpu which
may take long time, that to avoid triggering softlockup.
Signed-off-by: Li Bin <huawei.libin(a)huawei.com>
Signed-off-by: Peng Wu <wupeng58(a)huawei.com>
Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com>
---
drivers/iommu/dma-iommu.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 4b1a88f514c9..b144ce2b2915 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -68,6 +68,8 @@ struct iommu_dma_cookie {
/* Domain for flush queue callback; NULL if flush queue not in use */
struct iommu_domain *fq_domain;
struct mutex mutex;
+
+ struct work_struct free_iova_work;
};
static DEFINE_STATIC_KEY_FALSE(iommu_deferred_attach_enabled);
@@ -155,20 +157,11 @@ static void fq_flush_iotlb(struct iommu_dma_cookie *cookie)
static void fq_flush_timeout(struct timer_list *t)
{
struct iommu_dma_cookie *cookie = from_timer(cookie, t, fq_timer);
- int cpu;
atomic_set(&cookie->fq_timer_on, 0);
fq_flush_iotlb(cookie);
- for_each_possible_cpu(cpu) {
- unsigned long flags;
- struct iova_fq *fq;
-
- fq = per_cpu_ptr(cookie->fq, cpu);
- spin_lock_irqsave(&fq->lock, flags);
- fq_ring_free(cookie, fq);
- spin_unlock_irqrestore(&fq->lock, flags);
- }
+ schedule_work(&cookie->free_iova_work);
}
static void queue_iova(struct iommu_dma_cookie *cookie,
@@ -235,9 +228,28 @@ static void iommu_dma_free_fq(struct iommu_dma_cookie *cookie)
put_pages_list(&fq->entries[idx].freelist);
}
+ flush_work(&cookie->free_iova_work);
free_percpu(cookie->fq);
}
+static void free_iova_work_func(struct work_struct *work)
+{
+ struct iommu_dma_cookie *cookie;
+ int cpu;
+
+ cookie = container_of(work, struct iommu_dma_cookie, free_iova_work);
+ for_each_possible_cpu(cpu) {
+ unsigned long flags;
+ struct iova_fq *fq;
+
+ fq = per_cpu_ptr(cookie->fq, cpu);
+ spin_lock_irqsave(&fq->lock, flags);
+ fq_ring_free(cookie, fq);
+ spin_unlock_irqrestore(&fq->lock, flags);
+ }
+}
+
+
/* sysfs updates are serialised by the mutex of the group owning @domain */
int iommu_dma_init_fq(struct iommu_domain *domain)
{
@@ -271,6 +283,7 @@ int iommu_dma_init_fq(struct iommu_domain *domain)
cookie->fq = queue;
+ INIT_WORK(&cookie->free_iova_work, free_iova_work_func);
timer_setup(&cookie->fq_timer, fq_flush_timeout, 0);
atomic_set(&cookie->fq_timer_on, 0);
/*
--
2.17.1
2
1

29 Jan '24
hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8ZE0I
CVE: NA
---------------------------------
There is softlockup under fio pressure test with smmu enabled:
watchdog: BUG: soft lockup - CPU#81 stuck for 22s! [swapper/81:0]
...
Call trace:
fq_flush_timeout+0xc0/0x110
call_timer_fn+0x34/0x178
expire_timers+0xec/0x158
run_timer_softirq+0xc0/0x1f8
__do_softirq+0x120/0x324
irq_exit+0x11c/0x140
__handle_domain_irq+0x6c/0xc0
gic_handle_irq+0x6c/0x170
el1_irq+0xb8/0x140
arch_cpu_idle+0x38/0x1c0
default_idle_call+0x24/0x44
do_idle+0x1f4/0x2d8
cpu_startup_entry+0x2c/0x30
secondary_start_kernel+0x17c/0x1c8
This is because the timer callback fq_flush_timeout may run more than
10ms, and timer may be processed continuously in the softirq so trigger
softlockup. We can use work to deal with fq_ring_free for each cpu which
may take long time, that to avoid triggering softlockup.
Signed-off-by: Li Bin <huawei.libin(a)huawei.com>
Signed-off-by: Peng Wu <wupeng58(a)huawei.com>
Signed-off-by: Zhang Zekun <zhangzekun11(a)huawei.com>
---
drivers/iommu/dma-iommu.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 4b1a88f514c9..b144ce2b2915 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -68,6 +68,8 @@ struct iommu_dma_cookie {
/* Domain for flush queue callback; NULL if flush queue not in use */
struct iommu_domain *fq_domain;
struct mutex mutex;
+
+ struct work_struct free_iova_work;
};
static DEFINE_STATIC_KEY_FALSE(iommu_deferred_attach_enabled);
@@ -155,20 +157,11 @@ static void fq_flush_iotlb(struct iommu_dma_cookie *cookie)
static void fq_flush_timeout(struct timer_list *t)
{
struct iommu_dma_cookie *cookie = from_timer(cookie, t, fq_timer);
- int cpu;
atomic_set(&cookie->fq_timer_on, 0);
fq_flush_iotlb(cookie);
- for_each_possible_cpu(cpu) {
- unsigned long flags;
- struct iova_fq *fq;
-
- fq = per_cpu_ptr(cookie->fq, cpu);
- spin_lock_irqsave(&fq->lock, flags);
- fq_ring_free(cookie, fq);
- spin_unlock_irqrestore(&fq->lock, flags);
- }
+ schedule_work(&cookie->free_iova_work);
}
static void queue_iova(struct iommu_dma_cookie *cookie,
@@ -235,9 +228,28 @@ static void iommu_dma_free_fq(struct iommu_dma_cookie *cookie)
put_pages_list(&fq->entries[idx].freelist);
}
+ flush_work(&cookie->free_iova_work);
free_percpu(cookie->fq);
}
+static void free_iova_work_func(struct work_struct *work)
+{
+ struct iommu_dma_cookie *cookie;
+ int cpu;
+
+ cookie = container_of(work, struct iommu_dma_cookie, free_iova_work);
+ for_each_possible_cpu(cpu) {
+ unsigned long flags;
+ struct iova_fq *fq;
+
+ fq = per_cpu_ptr(cookie->fq, cpu);
+ spin_lock_irqsave(&fq->lock, flags);
+ fq_ring_free(cookie, fq);
+ spin_unlock_irqrestore(&fq->lock, flags);
+ }
+}
+
+
/* sysfs updates are serialised by the mutex of the group owning @domain */
int iommu_dma_init_fq(struct iommu_domain *domain)
{
@@ -271,6 +283,7 @@ int iommu_dma_init_fq(struct iommu_domain *domain)
cookie->fq = queue;
+ INIT_WORK(&cookie->free_iova_work, free_iova_work_func);
timer_setup(&cookie->fq_timer, fq_flush_timeout, 0);
atomic_set(&cookie->fq_timer_on, 0);
/*
--
2.17.1
1
0

[PATCH OLK-5.10 0/2] fix spinlock already unlocked in inet_csk_reqsk_queue_add' bug
by Zhengchao Shao 29 Jan '24
by Zhengchao Shao 29 Jan '24
29 Jan '24
Fix spinlock already unlocked in inet_csk_reqsk_queue_add' bug.
Zhengchao Shao (2):
tcp: make sure init the accept_queue's spinlocks once
ipv6: init the accept_queue's spinlocks in inet6_create
include/net/inet_connection_sock.h | 8 ++++++++
net/core/request_sock.c | 3 ---
net/ipv4/af_inet.c | 3 +++
net/ipv4/inet_connection_sock.c | 4 ++++
net/ipv6/af_inet6.c | 3 +++
5 files changed, 18 insertions(+), 3 deletions(-)
--
2.34.1
1
2