]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/io-pgtable-arm-v7s: Fix attributes when splitting blocks
authorRobin Murphy <robin.murphy@arm.com>
Thu, 11 Aug 2016 16:44:05 +0000 (17:44 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 19 Aug 2016 08:40:16 +0000 (09:40 +0100)
commitafc6e6be4601488d9a177c970bc2f8fdb2556a14
treecd7ad5a5779d4bcb65d2d90c88a891b532f7dcbe
parent92eda0ff5e2879da54cd299e1946d13cb37b1706
iommu/io-pgtable-arm-v7s: Fix attributes when splitting blocks

Due to the attribute bits being all over the place in the different
types of short-descriptor PTEs, when remapping an existing entry, e.g.
splitting a section into pages, we take the approach of decomposing
the PTE attributes back to the IOMMU API flags to start from scratch.

On inspection, though, the existing code seems to have got the read-only
bit backwards and ignored the XN bit. How embarrassing...

Fortunately the primary user so far, the Mediatek IOMMU, both never
splits blocks (because it only serves non-overlapping DMA API calls) and
also ignores permissions anyway, but let's put things right before any
future users trip up.

Cc: <stable@vger.kernel.org>
Fixes: 7d8dc82dd3db ("iommu/io-pgtable: Add ARMv7 short descriptor support")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/io-pgtable-arm-v7s.c