[RFC PATCH 7/7 v2] ppc: add dynamic dma window support
Nishanth Aravamudan
nacc at us.ibm.com
Fri Dec 10 06:00:17 EST 2010
On 09.12.2010 [15:17:06 +1100], Benjamin Herrenschmidt wrote:
> On Tue, 2010-10-26 at 20:35 -0700, Nishanth Aravamudan wrote:
>
> No much comments... I'm amazed how complex he firmware folks managed to
> make this ...
>
> > static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node)
> > {
> > int err = NOTIFY_OK;
> > struct device_node *np = node;
> > struct pci_dn *pci = PCI_DN(np);
> > + struct direct_window *window;
> >
> > switch (action) {
> > case PSERIES_RECONFIG_REMOVE:
> > if (pci && pci->iommu_table)
> > iommu_free_table(pci->iommu_table, np->full_name);
> > +
> > + spin_lock(&direct_window_list_lock);
> > + list_for_each_entry(window, &direct_window_list, list) {
> > + if (window->device == np) {
> > + list_del(&window->list);
> > + break;
> > + }
> > + }
> > + spin_unlock(&direct_window_list_lock);
>
> Should you also kfree the window ?
Yeah, looks like I should. I have a few other questions due to testing,
but I'll reply to my original e-mail with those.
Thanks for the review!
Nish
--
Nishanth Aravamudan <nacc at us.ibm.com>
IBM Linux Technology Center
More information about the Linuxppc-dev
mailing list