From: Sven Peter via iommu <iommu@lists.linux-foundation.org>
To: "Rouven Czerwinski" <r.czerwinski@pengutronix.de>,
"Will Deacon" <will@kernel.org>,
"Robin Murphy" <robin.murphy@arm.com>,
"Joerg Roedel" <joro@8bytes.org>,
"Rob Herring" <robh+dt@kernel.org>
Cc: Arnd Bergmann <arnd@kernel.org>,
devicetree@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
Hector Martin <marcan@marcan.st>,
linux-kernel@vger.kernel.org,
Petr Mladek via iommu <iommu@lists.linux-foundation.org>,
Alexander Graf <graf@amazon.com>,
Mohamed Mediouni <mohamed.mediouni@caramail.com>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
linux-arm-kernel@lists.infradead.org,
Stan Skowronek <stan@corellium.com>
Subject: Re: [PATCH v3 3/3] iommu: dart: Add DART iommu driver
Date: Sat, 05 Jun 2021 14:28:27 +0200 [thread overview]
Message-ID: <89b391d1-c076-491a-97c0-d08593c006e7@www.fastmail.com> (raw)
In-Reply-To: <d50ad9392f7719c01f752e73a00d4dc83b1a5c5c.camel@pengutronix.de>
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
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
prev parent reply other threads:[~2021-06-05 12:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 8:50 [PATCH v3 0/3] Apple M1 DART IOMMU driver Sven Peter via iommu
2021-06-03 8:50 ` [PATCH v3 1/3] iommu: io-pgtable: add DART pagetable format Sven Peter via iommu
2021-06-03 8:50 ` [PATCH v3 2/3] dt-bindings: iommu: add DART iommu bindings Sven Peter via iommu
2021-06-10 16:52 ` Rob Herring
2021-06-12 12:24 ` Sven Peter via iommu
2021-06-03 8:50 ` [PATCH v3 3/3] iommu: dart: Add DART iommu driver Sven Peter via iommu
2021-06-05 11:50 ` Rouven Czerwinski
2021-06-05 12:28 ` Sven Peter via iommu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=89b391d1-c076-491a-97c0-d08593c006e7@www.fastmail.com \
--to=iommu@lists.linux-foundation.org \
--cc=arnd@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=graf@amazon.com \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=mark.kettenis@xs4all.nl \
--cc=maz@kernel.org \
--cc=mohamed.mediouni@caramail.com \
--cc=r.czerwinski@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=stan@corellium.com \
--cc=sven@svenpeter.dev \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).