Hi Sam, Thank you for the patch! Yet something to improve:
[auto build test ERROR on v4.16-rc4] [also build test ERROR on next-20180319] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Sam-Bobroff/EEH-refactoring-1/20180320-024729 config: powerpc-ppc64_defconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=powerpc All errors (new ones prefixed by >>): In file included from include/linux/kernel.h:14:0, from include/linux/delay.h:22, from arch/powerpc/kernel/eeh_driver.c:25: arch/powerpc/kernel/eeh_driver.c: In function 'eeh_reset_device': >> arch/powerpc/kernel/eeh_driver.c:692:5: error: 'eeh_aware_driver' undeclared >> (first use in this function); did you mean 'eeh_state_active'? (eeh_aware_driver ? "partial" : "complete")); ^ include/linux/printk.h:308:34: note: in definition of macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ arch/powerpc/kernel/eeh_driver.c:692:5: note: each undeclared identifier is reported only once for each function it appears in (eeh_aware_driver ? "partial" : "complete")); ^ include/linux/printk.h:308:34: note: in definition of macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ vim +692 arch/powerpc/kernel/eeh_driver.c 5cfb20b96 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-09-30 619 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 620 /** 29f8bf1b7 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-02-27 621 * eeh_reset_device - Perform actual reset of a pci slot a10e51924 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 622 * @driver_eeh_aware: Does the device's driver provide EEH support? 9b3c76f08 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-07 623 * @pe: EEH PE 29f8bf1b7 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-02-27 624 * @bus: PCI bus corresponding to the isolcated slot a10e51924 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 625 * @rmv_data: Optional, list to record removed devices 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 626 * 29f8bf1b7 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-02-27 627 * This routine must be called to do reset on the indicated PE. 29f8bf1b7 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-02-27 628 * During the reset, udev might be invoked because those affected 29f8bf1b7 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-02-27 629 * PCI devices will be removed and then added. 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 630 */ 67086e32b arch/powerpc/kernel/eeh_driver.c Wei Yang 2016-03-04 631 static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus, a10e51924 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 632 struct eeh_rmv_data *rmv_data, a10e51924 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 633 bool driver_eeh_aware) 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 634 { edfd17ff3 arch/powerpc/kernel/eeh_driver.c Arnd Bergmann 2017-11-04 635 time64_t tstamp; 67086e32b arch/powerpc/kernel/eeh_driver.c Wei Yang 2016-03-04 636 int cnt, rc; 67086e32b arch/powerpc/kernel/eeh_driver.c Wei Yang 2016-03-04 637 struct eeh_dev *edev; 424054566 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2006-04-28 638 424054566 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2006-04-28 639 /* pcibios will clear the counter; save the value */ 9b3c76f08 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-07 640 cnt = pe->freeze_count; 5a71978e4 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-06-20 641 tstamp = pe->tstamp; 424054566 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2006-04-28 642 20ee6a970 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-11 643 /* 20ee6a970 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-11 644 * We don't remove the corresponding PE instances because 20ee6a970 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-11 645 * we need the information afterwords. The attached EEH 20ee6a970 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-11 646 * devices are expected to be attached soon when calling bd251b893 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2016-05-03 647 * into pci_hp_add_devices(). 20ee6a970 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-11 648 */ 807a827d4 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-07-24 649 eeh_pe_state_mark(pe, EEH_PE_KEEP); e723e4b42 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 650 if (driver_eeh_aware || (pe->type & EEH_PE_VF)) { e723e4b42 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 651 eeh_pe_dev_traverse(pe, eeh_rmv_device, rmv_data); 67086e32b arch/powerpc/kernel/eeh_driver.c Wei Yang 2016-03-04 652 } else { 1c2042c83 arch/powerpc/kernel/eeh_driver.c Rafael J. Wysocki 2014-01-15 653 pci_lock_rescan_remove(); bd251b893 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2016-05-03 654 pci_hp_remove_devices(bus); 1c2042c83 arch/powerpc/kernel/eeh_driver.c Rafael J. Wysocki 2014-01-15 655 pci_unlock_rescan_remove(); 67086e32b arch/powerpc/kernel/eeh_driver.c Wei Yang 2016-03-04 656 } 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 657 d0914f503 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-04-24 658 /* d0914f503 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-04-24 659 * Reset the pci controller. (Asserts RST#; resets config space). b6495c0c8 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 660 * Reconfigure bridges and devices. Don't try to bring the system 29f8bf1b7 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-02-27 661 * up if the reset failed for some reason. d0914f503 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-04-24 662 * d0914f503 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-04-24 663 * During the reset, it's very dangerous to have uncontrolled PCI d0914f503 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-04-24 664 * config accesses. So we prefer to block them. However, controlled d0914f503 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-04-24 665 * PCI config accesses initiated from EEH itself are allowed. 29f8bf1b7 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-02-27 666 */ 6654c9368 arch/powerpc/kernel/eeh_driver.c Russell Currey 2016-11-17 667 rc = eeh_pe_reset_full(pe); 28bf36f92 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-11-14 668 if (rc) b6495c0c8 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 669 return rc; 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 670 1c2042c83 arch/powerpc/kernel/eeh_driver.c Rafael J. Wysocki 2014-01-15 671 pci_lock_rescan_remove(); 1c2042c83 arch/powerpc/kernel/eeh_driver.c Rafael J. Wysocki 2014-01-15 672 9b3c76f08 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-07 673 /* Restore PE */ 9b3c76f08 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-07 674 eeh_ops->configure_bridge(pe); 9b3c76f08 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-07 675 eeh_pe_restore_bars(pe); 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 676 dc9c41bd9 arch/powerpc/kernel/eeh_driver.c Andrew Donnellan 2015-12-08 677 /* Clear frozen state */ 5cfb20b96 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-09-30 678 rc = eeh_clear_pe_frozen_state(pe, false); 409bf7f8a arch/powerpc/kernel/eeh_driver.c Andrew Donnellan 2016-12-01 679 if (rc) { 409bf7f8a arch/powerpc/kernel/eeh_driver.c Andrew Donnellan 2016-12-01 680 pci_unlock_rescan_remove(); 789547006 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-04-24 681 return rc; 409bf7f8a arch/powerpc/kernel/eeh_driver.c Andrew Donnellan 2016-12-01 682 } 789547006 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2014-04-24 683 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 684 /* Give the system 5 seconds to finish running the user-space 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 685 * hotplug shutdown scripts, e.g. ifdown for ethernet. Yes, 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 686 * this is a hack, but if we don't do this, and try to bring 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 687 * the device up before the scripts have taken it down, 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 688 * potentially weird things happen. 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 689 */ e723e4b42 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 690 if (!driver_eeh_aware || rmv_data->removed) { e723e4b42 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 691 pr_info("EEH: Sleep 5s ahead of %s hotplug\n", e723e4b42 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 @692 (eeh_aware_driver ? "partial" : "complete")); 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 693 ssleep(5); f5c57710d arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-07-24 694 f5c57710d arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-07-24 695 /* f5c57710d arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-07-24 696 * The EEH device is still connected with its parent f5c57710d arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-07-24 697 * PE. We should disconnect it so the binding can be f5c57710d arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-07-24 698 * rebuilt when adding PCI devices. f5c57710d arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-07-24 699 */ 67086e32b arch/powerpc/kernel/eeh_driver.c Wei Yang 2016-03-04 700 edev = list_first_entry(&pe->edevs, struct eeh_dev, list); f5c57710d arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-07-24 701 eeh_pe_traverse(pe, eeh_pe_detach_dev, NULL); a3aa256b7 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2016-06-17 702 if (pe->type & EEH_PE_VF) { 67086e32b arch/powerpc/kernel/eeh_driver.c Wei Yang 2016-03-04 703 eeh_add_virt_device(edev, NULL); a3aa256b7 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2016-06-17 704 } else { e723e4b42 arch/powerpc/kernel/eeh_driver.c Sam Bobroff 2018-03-19 705 if (!eeh_aware_driver) a3aa256b7 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2016-06-17 706 eeh_pe_state_clear(pe, EEH_PE_PRI_BUS); bd251b893 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2016-05-03 707 pci_hp_add_devices(bus); a3aa256b7 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2016-06-17 708 } 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 709 } f5c57710d arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-07-24 710 eeh_pe_state_clear(pe, EEH_PE_KEEP); 5a71978e4 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-06-20 711 5a71978e4 arch/powerpc/kernel/eeh_driver.c Gavin Shan 2013-06-20 712 pe->tstamp = tstamp; 9b3c76f08 arch/powerpc/platforms/pseries/eeh_driver.c Gavin Shan 2012-09-07 713 pe->freeze_count = cnt; b6495c0c8 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 714 1c2042c83 arch/powerpc/kernel/eeh_driver.c Rafael J. Wysocki 2014-01-15 715 pci_unlock_rescan_remove(); b6495c0c8 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 716 return 0; 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 717 } 77bd74156 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03 718 :::::: The code at line 692 was first introduced by commit :::::: e723e4b4269eefe9c70fbb6c378a26ab202662e2 powerpc/eeh: Factor out common code eeh_reset_device() :::::: TO: Sam Bobroff <sam.bobr...@au1.ibm.com> :::::: CC: 0day robot <fengguang...@intel.com> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip