iommu/arm-smmu: Fix LOG2SIZE setting for 2-level stream tables
authorWill Deacon <will.deacon@arm.com>
Tue, 30 Jun 2015 09:02:28 +0000 (10:02 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 8 Jul 2015 16:24:38 +0000 (17:24 +0100)
commitd2e88e7c081efb2c5a9e1adb2a065d373167af4b
tree4e329cf2ef9e7b86954b02c29d1463d0c9edbaee
parent69146e7bfc38139a134c79a4ee6607c881891786
iommu/arm-smmu: Fix LOG2SIZE setting for 2-level stream tables

STRTAB_BASE_CFG.LOG2SIZE should be set to log2(entries), where entries
is the *total* number of entries in the stream table, not just the first
level.

This patch fixes the register setting, which was previously being set to
the size of the l1 thanks to a multi-use "size" variable.

Reported-by: Zhen Lei <thunder.leizhen@huawei.com>
Tested-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu-v3.c