[PATCH] dynamic addition of PCI Host bridges
    John Rose 
    johnrose at austin.ibm.com
       
    Fri Sep 17 06:56:03 EST 2004
    
    
  
Hi Linas, thanks for the comments.
> nit-pick:
> I noticed that pci_alloc_pci_controller() and pci_alloc_phb_dynamic()
> are almost identical, except that one has the flag is_dynamic=1, 
> and the other not.  why not merge them into one, and just pass
> "is_dynamic" as a flag?
Knowing the high likelihood of code redundancy when doing something like
this, I asked the PLTT whether my approach on these issues should be 1)
adding a flag as you've described or 2) splitting into dyanmic vs. init
versions, and I remember Rusty (I think) answering 2.  
If you guys really agree with adding a flag for this particular
function, I don't mind either way :)
> question:
> I presume 'remove" is in the works?
> Is part of the difficulty of implementing remove that
> pci_alloc_pci_controller() calls alloc_bootmem(), which makes 
> freeing these things kind-of tricky? (i.e. since pci is getting
> set up before init_mem is done?)
> 
I previously posted the patch for remove:
http://ozlabs.org/ppc64-patches/patch.pl?id=241
It hasn't been accepted yet.  I suppose a third patch to be submitted
would augment the remove function to do something like:
	if (phb->is_dynamic)
		kfree(phb);
I'll post such a patch if some of these start getting accepted.  :)
> --linas
> 
> 
    
    
More information about the Linuxppc64-dev
mailing list