[PATCH] Separate pci bits out of struct device_node
Nathan Lynch
ntl at pobox.com
Tue Sep 6 14:13:31 EST 2005
Hi Paul,
No objection to the intent, but some concerns below.
Paul Mackerras wrote:
> @@ -40,16 +42,26 @@
> struct pci_controller *phb = data;
> int *type = (int *)get_property(dn, "ibm,pci-config-space-type", NULL);
> u32 *regs;
> + struct pci_dn *pdn;
>
> - dn->phb = phb;
> + if (phb->is_dynamic)
> + pdn = kmalloc(sizeof(*pdn), GFP_KERNEL);
> + else
> + pdn = alloc_bootmem(sizeof(*pdn));
I don't see in the patch where the pci_dn is freed when its
device_node goes away.
Should the lifetime of a pci_dn be tied to its corresponding
device_node?
Should code which accesses a pci_dn hold a reference to its
corresponding device_node?
More information about the Linuxppc64-dev
mailing list