OSDN Git Service

iommu/arm-smmu: ensure CBA2R is initialised before CBAR on SMMUv2
authorWill Deacon <will.deacon@arm.com>
Wed, 4 Mar 2015 12:21:03 +0000 (12:21 +0000)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:14:50 +0000 (11:14 -0700)
commitab1900e31088ad5a62199b6abd797aa9e9f79971
tree66be154e9e66b7ca7ba898014506fc1a91b44444
parent1805fabc3e76b80e2dcc73f78e70ee9b61406e9b
iommu/arm-smmu: ensure CBA2R is initialised before CBAR on SMMUv2

The VMID16 (8.1) extension to SMMUv2 added a 16-bit VMID16 field to the
CBA2R registers. Unfortunately, if software writes this field as zero
after setting an 8-bit VMID in a stage-2 CBAR, then the VMID may also be
overwritten with zero on some early implementations (the architecture
was later updated to fix this issue).

This patch ensures that we initialise CBA2R before CBAR, therefore
ensuring that the VMID is set correctly.

Tested-by: Manish Jaggi <mjaggi@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c