Re: [PATCH v4] powerpc/pseries: use pci_host_bridge.release_fn() to kfree(phb)

2016-08-12 Thread Mauricio Faria de Oliveira
Michael, On 08/12/2016 02:54 AM, Gavin Shan wrote: > I don't have more obvious comments except below one nitpicky: I just addressed/replied this in the other e-mail; i think it's OK, and Andrew/cxl is OK w/ it too. > Reviewed-by: Gavin Shan On 08/12/2016 03:06 AM, Andrew Donnellan wrote: Su

Re: [PATCH v4] powerpc/pseries: use pci_host_bridge.release_fn() to kfree(phb)

2016-08-12 Thread Mauricio Faria de Oliveira
On 08/12/2016 03:03 AM, Andrew Donnellan wrote: On 12/08/16 15:54, Gavin Shan wrote: It might be nicer for users to implement their own pcibios_free_controller_deferred(), meaning pSeries needs its own implementation for now. The reason is more user (pSeries) specific objects can be released tog

Re: [PATCH v4] powerpc/pseries: use pci_host_bridge.release_fn() to kfree(phb)

2016-08-11 Thread Andrew Donnellan
On 12/08/16 06:25, Mauricio Faria de Oliveira wrote: This patch leverages 'struct pci_host_bridge' from the PCI subsystem in order to free the pci_controller only after the last reference to its devices is dropped (avoiding an oops in pcibios_release_device() if the last reference is dropped afte

Re: [PATCH v4] powerpc/pseries: use pci_host_bridge.release_fn() to kfree(phb)

2016-08-11 Thread Andrew Donnellan
On 12/08/16 15:54, Gavin Shan wrote: It might be nicer for users to implement their own pcibios_free_controller_deferred(), meaning pSeries needs its own implementation for now. The reason is more user (pSeries) specific objects can be released together with the PHB. However, I'm still fine wi

Re: [PATCH v4] powerpc/pseries: use pci_host_bridge.release_fn() to kfree(phb)

2016-08-11 Thread Gavin Shan
On Thu, Aug 11, 2016 at 05:25:40PM -0300, Mauricio Faria de Oliveira wrote: >This patch leverages 'struct pci_host_bridge' from the PCI subsystem >in order to free the pci_controller only after the last reference to >its devices is dropped (avoiding an oops in pcibios_release_device() >if the last

[PATCH v4] powerpc/pseries: use pci_host_bridge.release_fn() to kfree(phb)

2016-08-11 Thread Mauricio Faria de Oliveira
This patch leverages 'struct pci_host_bridge' from the PCI subsystem in order to free the pci_controller only after the last reference to its devices is dropped (avoiding an oops in pcibios_release_device() if the last reference is dropped after pcibios_free_controller()). The patch relies on pci_