mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
iommu/arm-smmu: Fix SMR mask extraction for bootloader programmed SMRs
When extracting the mask for an SMR that was programmed by the bootloader, the SMR.valid field is also extracted and is treated as part of the mask. This causes issues when removing an SMMU master, as removing the master involves constructing an SMR entry with the mask and SID without the valid bit set and writing that value to the SMR. However, since the valid bit was part of the mask, the SMR will still be valid. Instead, remove the valid bit from the raw SMR value that is used for extracting the SMR mask. Change-Id: Iccada2c474b196200ae1b56eb9faa9cb026f5ef1 Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
b482a807a1
commit
8b27d2333a
1 changed files with 1 additions and 1 deletions
|
|
@ -4387,7 +4387,7 @@ static int arm_smmu_handoff_cbs(struct arm_smmu_device *smmu)
|
|||
if (!(raw_smr & SMR_VALID))
|
||||
continue;
|
||||
|
||||
smr.mask = FIELD_GET(SMR_MASK, raw_smr);
|
||||
smr.mask = FIELD_GET(SMR_MASK, raw_smr & ~SMR_VALID);
|
||||
smr.id = FIELD_GET(SMR_ID, raw_smr);
|
||||
smr.valid = true;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue