* arch/s390/pci/pci_event.c:301:0-1: preceding lock on line 270
@ 2024-10-18 0:29 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-18 0:29 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Gerd Bayer <gbayer@linux.ibm.com>
CC: Heiko Carstens <hca@linux.ibm.com>
CC: Niklas Schnelle <schnelle@linux.ibm.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6efbea77b390604a7be7364583e19cd2d6a1291b
commit: bcb5d6c769039c8358a2359e7c3ea5d97ce93108 s390/pci: introduce lock to synchronize state of zpci_dev's
date: 8 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 8 months ago
config: s390-randconfig-r064-20241018 (https://download.01.org/0day-ci/archive/20241018/202410180804.d4Yn6AWs-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project bfe84f7085d82d06d61c632a7bad1e692fd159e4)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202410180804.d4Yn6AWs-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> arch/s390/pci/pci_event.c:301:0-1: preceding lock on line 270
vim +301 arch/s390/pci/pci_event.c
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 257
aa3b7c296732b4 Sebastian Ott 2013-12-12 258 static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
d795ddad36cbc8 Sebastian Ott 2013-11-15 259 {
d795ddad36cbc8 Sebastian Ott 2013-11-15 260 struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid);
9a99649f2a89fd Sebastian Ott 2016-01-29 261 struct pci_dev *pdev = NULL;
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 262 pci_ers_result_t ers_res;
d795ddad36cbc8 Sebastian Ott 2013-11-15 263
6526a597a2e856 Niklas Schnelle 2021-09-15 264 zpci_dbg(3, "err fid:%x, fh:%x, pec:%x\n",
6526a597a2e856 Niklas Schnelle 2021-09-15 265 ccdf->fid, ccdf->fh, ccdf->pec);
d795ddad36cbc8 Sebastian Ott 2013-11-15 266 zpci_err("error CCDF:\n");
d795ddad36cbc8 Sebastian Ott 2013-11-15 267 zpci_err_hex(ccdf, sizeof(*ccdf));
d795ddad36cbc8 Sebastian Ott 2013-11-15 268
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 269 if (zdev) {
bcb5d6c769039c Gerd Bayer 2023-11-10 @270 mutex_lock(&zdev->state_lock);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 271 zpci_update_fh(zdev, ccdf->fh);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 272 if (zdev->zbus->bus)
44510d6fa0c00a Pierre Morel 2020-04-22 273 pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 274 }
9a99649f2a89fd Sebastian Ott 2016-01-29 275
d795ddad36cbc8 Sebastian Ott 2013-11-15 276 pr_err("%s: Event 0x%x reports an error for PCI function 0x%x\n",
515f022e8b59ce Sebastian Ott 2015-07-28 277 pdev ? pci_name(pdev) : "n/a", ccdf->pec, ccdf->fid);
8ead7efb637935 Sebastian Ott 2016-01-22 278
8ead7efb637935 Sebastian Ott 2016-01-22 279 if (!pdev)
c122383d221dfa Niklas Schnelle 2021-09-20 280 goto no_pdev;
8ead7efb637935 Sebastian Ott 2016-01-22 281
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 282 switch (ccdf->pec) {
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 283 case 0x003a: /* Service Action or Error Recovery Successful */
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 284 ers_res = zpci_event_attempt_error_recovery(pdev);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 285 if (ers_res != PCI_ERS_RESULT_RECOVERED)
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 286 zpci_event_io_failure(pdev, pci_channel_io_perm_failure);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 287 break;
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 288 default:
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 289 /*
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 290 * Mark as frozen not permanently failed because the device
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 291 * could be subsequently recovered by the platform.
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 292 */
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 293 zpci_event_io_failure(pdev, pci_channel_io_frozen);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 294 break;
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07 295 }
9a99649f2a89fd Sebastian Ott 2016-01-29 296 pci_dev_put(pdev);
c122383d221dfa Niklas Schnelle 2021-09-20 297 no_pdev:
bcb5d6c769039c Gerd Bayer 2023-11-10 298 if (zdev)
bcb5d6c769039c Gerd Bayer 2023-11-10 299 mutex_unlock(&zdev->state_lock);
c122383d221dfa Niklas Schnelle 2021-09-20 300 zpci_zdev_put(zdev);
d795ddad36cbc8 Sebastian Ott 2013-11-15 @301 }
d795ddad36cbc8 Sebastian Ott 2013-11-15 302
:::::: The code at line 301 was first introduced by commit
:::::: d795ddad36cbc828176c898a5084549030539162 s390/pci: implement hotplug notifications
:::::: TO: Sebastian Ott <sebott@linux.vnet.ibm.com>
:::::: CC: Martin Schwidefsky <schwidefsky@de.ibm.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-18 0:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 0:29 arch/s390/pci/pci_event.c:301:0-1: preceding lock on line 270 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.