]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu: use mutex instead of spinlock for locking page tables
authorWill Deacon <will.deacon@arm.com>
Thu, 7 Nov 2013 18:47:50 +0000 (18:47 +0000)
committerWill Deacon <will.deacon@arm.com>
Fri, 6 Dec 2013 16:44:13 +0000 (16:44 +0000)
commitce68066b16c4173e5e2a9257a35ec235c0b25106
tree5d90175829600719209f730c5fdf3f4bc8e43363
parentc1384d5fee1703a57057f75677fe6fe37a3304bf
iommu/arm-smmu: use mutex instead of spinlock for locking page tables

When creating IO mappings, we lazily allocate our page tables using the
standard, non-atomic allocator functions. This presents us with a
problem, since our page tables are protected with a spinlock.

This patch reworks the smmu_domain lock to use a mutex instead of a
spinlock. iova_to_phys is then reworked so that it only reads the page
tables, and can run in a lockless fashion, leaving the mutex to guard
against concurrent mapping threads.

Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c