Merge branch 'for-joerg/arm-smmu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into iommu/fixes
This commit is contained in:
commit
11cd3386a1
|
@ -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 */
|
||||
|
|
|
@ -335,8 +335,12 @@ static int __arm_lpae_map(struct arm_lpae_io_pgtable *data, unsigned long iova,
|
|||
if (cfg->quirks & IO_PGTABLE_QUIRK_ARM_NS)
|
||||
pte |= ARM_LPAE_PTE_NSTABLE;
|
||||
__arm_lpae_set_pte(ptep, pte, cfg);
|
||||
} else {
|
||||
} else if (!iopte_leaf(pte, lvl)) {
|
||||
cptep = iopte_deref(pte, data);
|
||||
} else {
|
||||
/* We require an unmap first */
|
||||
WARN_ON(!selftest_running);
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
/* Rinse, repeat */
|
||||
|
|
Loading…
Reference in New Issue