summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/iommu.c
diff options
context:
space:
mode:
authorRobin Murphy2019-06-03 14:15:37 +0200
committerJoerg Roedel2019-06-12 10:08:56 +0200
commit4e4abae311e4b44aaf61f18a826fd7136037f199 (patch)
treeabeaad5c2a5d95d0b511899282593c9f51b6a806 /drivers/iommu/iommu.c
parentiommu/vt-d: Set the right field for Page Walk Snoop (diff)
downloadkernel-qcow2-linux-4e4abae311e4b44aaf61f18a826fd7136037f199.tar.gz
kernel-qcow2-linux-4e4abae311e4b44aaf61f18a826fd7136037f199.tar.xz
kernel-qcow2-linux-4e4abae311e4b44aaf61f18a826fd7136037f199.zip
iommu/arm-smmu: Avoid constant zero in TLBI writes
Apparently, some Qualcomm arm64 platforms which appear to expose their SMMU global register space are still, in fact, using a hypervisor to mediate it by trapping and emulating register accesses. Sadly, some deployed versions of said trapping code have bugs wherein they go horribly wrong for stores using r31 (i.e. XZR/WZR) as the source register. While this can be mitigated for GCC today by tweaking the constraints for the implementation of writel_relaxed(), to avoid any potential arms race with future compilers more aggressively optimising register allocation, the simple way is to just remove all the problematic constant zeros. For the write-only TLB operations, the actual value is irrelevant anyway and any old nearby variable will provide a suitable GPR to encode. The one point at which we really do need a zero to clear a context bank happens before any of the TLB maintenance where crashes have been reported, so is apparently not a problem... :/ Reported-by: AngeloGioacchino Del Regno <kholk11@gmail.com> Tested-by: Marc Gonzalez <marc.w.gonzalez@free.fr> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr> Acked-by: Will Deacon <will.deacon@arm.com> Cc: stable@vger.kernel.org Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu.c')
0 files changed, 0 insertions, 0 deletions