Thread (8 messages) 8 messages, 3 authors, 2021-06-12

Re: [PATCH v3 3/3] iommu: dart: Add DART iommu driver

From: Sven Peter <hidden>
Date: 2021-06-05 12:29:13
Also in: linux-devicetree, linux-iommu, lkml

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:
quoted
+
+/* must be called with held dart_domain->lock */
You can remove this comment, include lockdep.h and…
quoted
+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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help