Re: [PATCH 1/2] powerpc/powernv: clear the refcount for pci_dev on powernv platform

2014-04-22 Thread Benjamin Herrenschmidt
On Tue, 2014-04-22 at 15:44 +0800, Wei Yang wrote: So this patch(the 2nd one) doesn't contribute to clear the warning and error. Only the first patch did it. Please ignore this one. But is it correct ? It's not right to keep a refcount elevated if we don't have to. Gavin, can you get to the

Re: [PATCH 1/2] powerpc/powernv: clear the refcount for pci_dev on powernv platform

2014-04-22 Thread Wei Yang
On Tue, Apr 22, 2014 at 06:25:09PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2014-04-22 at 15:44 +0800, Wei Yang wrote: So this patch(the 2nd one) doesn't contribute to clear the warning and error. Only the first patch did it. Please ignore this one. But is it correct ? It's not right to

Re: [PATCH 1/2] powerpc/powernv: clear the refcount for pci_dev on powernv platform

2014-04-22 Thread Gavin Shan
On Tue, Apr 22, 2014 at 06:25:09PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2014-04-22 at 15:44 +0800, Wei Yang wrote: So this patch(the 2nd one) doesn't contribute to clear the warning and error. Only the first patch did it. Please ignore this one. But is it correct ? It's not right to

Re: [PATCH 1/2] powerpc/powernv: clear the refcount for pci_dev on powernv platform

2014-04-22 Thread Benjamin Herrenschmidt
On Wed, 2014-04-23 at 09:00 +1000, Gavin Shan wrote: The side effect of holding pci_dev refcount is the pci_dev, eeh_dev, eeh_pe instance can't be free'ed during fully hotplug though EEH can survive. It's reasonable to remove it. Allright. Can you guys refresh that patch with an updated cset

Re: [PATCH 1/2] powerpc/powernv: clear the refcount for pci_dev on powernv platform

2014-04-22 Thread Wei Yang
On Wed, Apr 23, 2014 at 10:26:18AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2014-04-23 at 09:00 +1000, Gavin Shan wrote: The side effect of holding pci_dev refcount is the pci_dev, eeh_dev, eeh_pe instance can't be free'ed during fully hotplug though EEH can survive. It's reasonable to

Re: [PATCH 1/2] powerpc/powernv: clear the refcount for pci_dev on powernv platform

2014-04-21 Thread Wei Yang
On Mon, Apr 21, 2014 at 01:35:34PM +1000, Benjamin Herrenschmidt wrote: On Mon, 2014-04-21 at 10:25 +0800, Wei Yang wrote: When pcibios_remove_pci_devices() is removing pci devices, it will release pci device respectively. When the refcount of the device is 0, the pci_dev structure will be

Re: [PATCH 1/2] powerpc/powernv: clear the refcount for pci_dev on powernv platform

2014-04-21 Thread Gavin Shan
On Mon, Apr 21, 2014 at 10:25:18AM +0800, Wei Yang wrote: When pcibios_remove_pci_devices() is removing pci devices, it will release pci device respectively. When the refcount of the device is 0, the pci_dev structure will be destroyed. On PowerNV platform, the pci_dev will not be destroyed since

[PATCH 1/2] powerpc/powernv: clear the refcount for pci_dev on powernv platform

2014-04-20 Thread Wei Yang
When pcibios_remove_pci_devices() is removing pci devices, it will release pci device respectively. When the refcount of the device is 0, the pci_dev structure will be destroyed. On PowerNV platform, the pci_dev will not be destroyed since the refcount is not 0. After applying the patch, this

Re: [PATCH 1/2] powerpc/powernv: clear the refcount for pci_dev on powernv platform

2014-04-20 Thread Benjamin Herrenschmidt
On Mon, 2014-04-21 at 10:25 +0800, Wei Yang wrote: When pcibios_remove_pci_devices() is removing pci devices, it will release pci device respectively. When the refcount of the device is 0, the pci_dev structure will be destroyed. On PowerNV platform, the pci_dev will not be destroyed since