Skip to content
Commit eac0104d authored by Jernej Skrabec's avatar Jernej Skrabec Committed by Joerg Roedel
Browse files

iommu/sun50i: Fix R/W permission check



Because driver has enum type permissions and iommu subsystem has bitmap
type, we have to be careful how check for combined read and write
permissions is done. In such case, we have to mask both permissions and
check that both are set at the same time.

Current code just masks both flags but doesn't check that both are set.
In short, it always sets R/W permission, regardles if requested
permissions were RO, WO or RW. Fix that.

Fixes: 4100b8c2 ("iommu: Add Allwinner H6 IOMMU driver")
Signed-off-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20221025165415.307591-4-jernej.skrabec@gmail.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent cef20703
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment