Ben, On 07/04/2016 11:55 PM, Benjamin Herrenschmidt wrote:
Have you considered instead adding a kref to the PHB and only freeing it when all devices have been freed ? Or it's too hard to tract device creation ?
Can you clarify which are the devices that should be tracked w/ krefs to the PHB? I've been wondering if it's just the root bus (phb->bus) -- which relays on it (ie its phb->bus->children and phb->bus->devices) being eventually freed in order to free the phb, or perhaps track the children & devices directly. If that's too far from sensible, can you point some interesting places to look at? I've read much of arch/powerpc/kernel/pci-{common,hotplug}.c and arch/powerpc/include/asm/pci-bridge.h, and some more in drivers/pci, but things weren't as obvious to a newcomer in this area. Thanks, -- Mauricio Faria de Oliveira IBM Linux Technology Center _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev