Hi Rouven, On Sat, Jun 5, 2021, at 13:50, Rouven Czerwinski wrote: > Hi Sven, > > just a small comment, see inline. > > On Thu, 2021-06-03 at 10:50 +0200, Sven Peter wrote: > > + > > +/* must be called with held dart_domain->lock */ > > You can remove this comment, include lockdep.h and… > > > +static int apple_dart_finalize_domain(struct iommu_domain *domain) > > +{ > > + struct apple_dart_domain *dart_domain = to_dart_domain(domain); > > + struct apple_dart *dart = dart_domain->dart; > > + struct io_pgtable_cfg pgtbl_cfg; > > + > > lockdep_assert_held(&dart_domain->lock); > > A lockdep enabled kernel will warn if this function is called without > the lock held, otherwise this gets optimized out. Same for the similar > comments below. > That looks very useful, thanks! Will use it for v4. I only found assert_spin_locked originally but didn't want to have that performance overhead for code that (I hope :-)) correctly uses these functions with a held lock right now. Thanks, Sven