iommu/rockchip: fix permission bits in page table entries v2
authorMichael Riesch <michael.riesch@wolfvision.net>
Wed, 2 Nov 2022 06:35:53 +0000 (07:35 +0100)
committerJoerg Roedel <jroedel@suse.de>
Thu, 3 Nov 2022 14:58:41 +0000 (15:58 +0100)
commit7eb99841f340b80be0d0973b0deb592d75fb8928
treec783209e3439e765fcd67a233faf54f45f59bf00
parent30a0b95b1335e12efef89dd78518ed3e4a71a763
iommu/rockchip: fix permission bits in page table entries v2

As pointed out in the corresponding downstream fix [0], the permission bits
of the page table entries are compatible between v1 and v2 of the IOMMU.
This is in contrast to the current mainline code that incorrectly assumes
that the read and write permission bits are switched. Fix the permission
bits by reusing the v1 bit defines.

[0] https://github.com/rockchip-linux/kernel/commit/e3bc123a2260145e34b57454da3db0edd117eb8e

Fixes: c55356c534aa ("iommu: rockchip: Add support for iommu v2")
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20221102063553.2464161-1-michael.riesch@wolfvision.net
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/rockchip-iommu.c