[PATCH v5 06/11] powerpc/pseries/iommu: Add ddw_property_create() and refactor enable_ddw()
Leonardo Brás
leobras.c at gmail.com
Tue Aug 17 15:59:14 AEST 2021
Hello Fred, thanks for this feedback!
On Tue, 2021-07-20 at 19:49 +0200, Frederic Barrat wrote:
>
> > kfree(window);
> >
> > -out_clear_window:
> > - remove_ddw(pdn, true);
> > +out_del_prop:
> > + of_remove_property(pdn, win64);
> >
> > out_free_prop:
> > kfree(win64->name);
> > kfree(win64->value);
> > kfree(win64);
> >
> > +out_remove_win:
> > + remove_ddw(pdn, true);
>
>
> I believe there's a small problem here. We jump directly to
> out_remove_win if allocating the property failed. Yet, the first
> thing
> remove_ddw() does is look for the property. So it will never find it
> and
> the window is never removed by the hypervisor.
>
> Fred
That makes sense, thanks for catching this one!
What I intended here was just removing the DDW, so I think it should be
ok replacing remove_ddw() by a new helper that only does the rtas-call.
I will send a v6 with this change soon.
>
>
> > +
> > out_failed:
> > if (default_win_removed)
> > reset_dma_window(dev, pdn);
> >
More information about the Linuxppc-dev
mailing list