Re: [PATCH v2 1/2] powerpc: add refcount to struct pci_controller

2016-08-10 Thread Mauricio Faria de Oliveira
On 08/10/2016 10:53 AM, Mauricio Faria de Oliveira wrote: I'll go down that path for a PATCH v3. That is, 'powerpc/pseries: use pci_host_bridge.release_fn() to kfree(phb)' -- Mauricio Faria de Oliveira IBM Linux Technology Center

Re: [PATCH v2 1/2] powerpc: add refcount to struct pci_controller

2016-08-10 Thread Mauricio Faria de Oliveira
On 08/09/2016 10:45 PM, Andrew Donnellan wrote: I'm currently working on a cxl defect found by an IBM test team where we run into this - will review this patch more thoroughly and test it shortly. Gavin provided a review/suggestions via chat, pointing to rely on the refcount that already exists

Re: [PATCH v2 1/2] powerpc: add refcount to struct pci_controller

2016-08-10 Thread Mauricio Faria de Oliveira
On 08/09/2016 10:45 PM, Andrew Donnellan wrote: [snip] Notably, only the pseries platform calls pcibios_free_controller() for some purpose other than to release the pci_controller in case of errors just after the call to pcibios_alloc_controller() (i.e., 'goto error' scenarios). cxl's vPHB API

Re: [PATCH v2 1/2] powerpc: add refcount to struct pci_controller

2016-08-09 Thread Andrew Donnellan
On 10/08/16 10:44, Mauricio Faria de Oliveira wrote: This commit introduces the 'refcount' field in struct pci_controller, along with the corresponding functions 'controller_(get|put|free)()'. The functions 'pcibios_(alloc|free)_controller()' are modified to use that in a backwards compatible ma