diff options
author | Dave Airlie <airlied@redhat.com> | 2017-03-28 09:34:19 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-03-28 09:34:19 +0200 |
commit | e5c1ff14757afe21733ddee9cc4bbaeaeadbf803 (patch) | |
tree | 0da1c9aaf772fac30fe68590a4ca1c3dd439cebd /drivers/iommu/io-pgtable-arm-v7s.c | |
parent | BackMerge tag 'v4.11-rc3' into drm-next (diff) | |
parent | Linux 4.11-rc4 (diff) | |
download | linux-e5c1ff14757afe21733ddee9cc4bbaeaeadbf803.tar.xz linux-e5c1ff14757afe21733ddee9cc4bbaeaeadbf803.zip |
Backmerge tag 'v4.11-rc4' into drm-next
Linux 4.11-rc4
The i915 GVT team need the rc4 code to base some more code on.
Diffstat (limited to 'drivers/iommu/io-pgtable-arm-v7s.c')
-rw-r--r-- | drivers/iommu/io-pgtable-arm-v7s.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c index 1c049e2e12bf..8d6ca28c3e1f 100644 --- a/drivers/iommu/io-pgtable-arm-v7s.c +++ b/drivers/iommu/io-pgtable-arm-v7s.c @@ -422,8 +422,12 @@ static int __arm_v7s_map(struct arm_v7s_io_pgtable *data, unsigned long iova, pte |= ARM_V7S_ATTR_NS_TABLE; __arm_v7s_set_pte(ptep, pte, 1, cfg); - } else { + } else if (ARM_V7S_PTE_IS_TABLE(pte, lvl)) { cptep = iopte_deref(pte, lvl); + } else { + /* We require an unmap first */ + WARN_ON(!selftest_running); + return -EEXIST; } /* Rinse, repeat */ |