[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191017162453.GA6012@infradead.org>
Date: Thu, 17 Oct 2019 09:24:53 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Robin Murphy <robin.murphy@....com>
Cc: joro@...tes.org, iommu@...ts.linux-foundation.org, maz@...nel.org,
julien.grall@....com, linux-kernel@...r.kernel.org,
Qian Cai <cai@....pw>
Subject: Re: [PATCH] iommu/dma: Relax locking in iommu_dma_prepare_msi()
On Wed, Oct 16, 2019 at 06:07:36PM +0100, Robin Murphy wrote:
> @@ -1180,7 +1179,7 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
> struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
> struct iommu_dma_cookie *cookie;
> struct iommu_dma_msi_page *msi_page;
> - unsigned long flags;
> + static DEFINE_MUTEX(msi_prepare_lock);
Just a style nitpick, but I find locks declared inside functions
really weird. In addition to that locks not embedded into a structure
and not directly next to variables or data structures they protect
really need a comment explaining what they are trying to serialize.
Powered by blists - more mailing lists