[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one
>>> On 07.03.16 at 08:05, <quan.xu@xxxxxxxxx> wrote: > I try to fix it with follow: > --------patch >> -------- > > --- a/xen/drivers/passthrough/pci.c > +++ b/xen/drivers/passthrough/pci.c > @@ -118,6 +118,11 @@ int pcidevs_is_locked(void) > return spin_is_locked(&_pcidevs_lock); > } > > +int pcidevs_trylock(void) > +{ > + return spin_trylock_recursive(&_pcidevs_lock); > +} > + > void __init pt_pci_init(void) > { > radix_tree_init(&pci_segments); > @@ -1365,7 +1370,7 @@ static int assign_device(struct domain *d, u16 seg, u8 > bus, u8 devfn, u32 flag) > p2m_get_hostp2m(d)->global_logdirty)) ) > return -EXDEV; > > - if ( !spin_trylock(&pcidevs_lock) ) > + if ( !pcidevs_trylock() ) > return -ERESTART; Exactly. > A quick question, is it '-ERESTART', instead of '-EBUSY' ? No idea what this question is about in this context. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |