lkml.org 
[lkml]   [2021]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/3] iommu: dart: Add DART iommu driver
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

\
 
 \ /
  Last update: 2021-06-05 14:29    [W:0.046 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site