tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/06-22-oza-aer head: 2736412b695cac0505ac33515d07d5cfe34bfc03 commit: d34dfe4404a282e6a3051c27c594f3841bd55d11 [1/7] PCI/AER: Clear only ERR_FATAL status bits during fatal recovery config: i386-randconfig-x010-201828 (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: git checkout d34dfe4404a282e6a3051c27c594f3841bd55d11 # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers/pci/pcie/err.c: In function 'pcie_do_fatal_recovery': >> drivers/pci/pcie/err.c:319:3: error: implicit declaration of function 'pci_aer_clear_fatal_status'; did you mean 'pcie_clear_root_pme_status'? [-Werror=implicit-function-declaration] pci_aer_clear_fatal_status(dev); ^~~~~~~~~~~~~~~~~~~~~~~~~~ pcie_clear_root_pme_status Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:set_bit Cyclomatic Complexity 1 include/linux/kobject.h:kobject_name Cyclomatic Complexity 2 include/linux/device.h:dev_name Cyclomatic Complexity 1 include/linux/pci.h:pci_name Cyclomatic Complexity 1 include/linux/aer.h:pci_cleanup_aer_uncorrect_error_status Cyclomatic Complexity 1 drivers/pci/pcie/../pci.h:pci_has_subordinate Cyclomatic Complexity 1 drivers/pci/pcie/../pci.h:pci_dev_set_disconnected Cyclomatic Complexity 6 drivers/pci/pcie/err.c:merge_result Cyclomatic Complexity 6 drivers/pci/pcie/err.c:broadcast_error_message Cyclomatic Complexity 1 drivers/pci/pcie/err.c:default_reset_link Cyclomatic Complexity 6 drivers/pci/pcie/err.c:reset_link Cyclomatic Complexity 1 include/linux/device.h:device_lock Cyclomatic Complexity 1 include/linux/device.h:device_unlock Cyclomatic Complexity 4 drivers/pci/pcie/err.c:report_resume Cyclomatic Complexity 4 drivers/pci/pcie/err.c:report_slot_reset Cyclomatic Complexity 4 drivers/pci/pcie/err.c:report_mmio_enabled Cyclomatic Complexity 8 drivers/pci/pcie/err.c:report_error_detected Cyclomatic Complexity 11 drivers/pci/pcie/err.c:pcie_do_fatal_recovery Cyclomatic Complexity 4 drivers/pci/pcie/err.c:pcie_do_nonfatal_recovery cc1: some warnings being treated as errors vim +319 drivers/pci/pcie/err.c 275 276 /** 277 * pcie_do_fatal_recovery - handle fatal error recovery process 278 * @dev: pointer to a pci_dev data structure of agent detecting an error 279 * 280 * Invoked when an error is fatal. Once being invoked, removes the devices 281 * beneath this AER agent, followed by reset link e.g. secondary bus reset 282 * followed by re-enumeration of devices. 283 */ 284 void pcie_do_fatal_recovery(struct pci_dev *dev, u32 service) 285 { 286 struct pci_dev *udev; 287 struct pci_bus *parent; 288 struct pci_dev *pdev, *temp; 289 pci_ers_result_t result; 290 291 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) 292 udev = dev; 293 else 294 udev = dev->bus->self; 295 296 parent = udev->subordinate; 297 pci_lock_rescan_remove(); 298 list_for_each_entry_safe_reverse(pdev, temp, &parent->devices, 299 bus_list) { 300 pci_dev_get(pdev); 301 pci_dev_set_disconnected(pdev, NULL); 302 if (pci_has_subordinate(pdev)) 303 pci_walk_bus(pdev->subordinate, 304 pci_dev_set_disconnected, NULL); 305 pci_stop_and_remove_bus_device(pdev); 306 pci_dev_put(pdev); 307 } 308 309 result = reset_link(udev, service); 310 311 if ((service == PCIE_PORT_SERVICE_AER) && 312 (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)) { 313 /* 314 * If the error is reported by a bridge, we think this error 315 * is related to the downstream link of the bridge, so we 316 * do error recovery on all subordinates of the bridge instead 317 * of the bridge and clear the error status of the bridge. 318 */ > 319 pci_aer_clear_fatal_status(dev); 320 } 321 322 if (result == PCI_ERS_RESULT_RECOVERED) { 323 if (pcie_wait_for_link(udev, true)) 324 pci_rescan_bus(udev->bus); 325 pci_info(dev, "Device recovery from fatal error successful\n"); 326 } else { 327 pci_uevent_ers(dev, PCI_ERS_RESULT_DISCONNECT); 328 pci_info(dev, "Device recovery from fatal error failed\n"); 329 } 330 331 pci_unlock_rescan_remove(); 332 } 333 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip