Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73a030f0 authored by Patrick Daly's avatar Patrick Daly Committed by Liam Mark
Browse files

Revert "iommu/io-pgtable-arm: Unmap and free table when overwriting with block"



This reverts commit cf27ec93 ("iommu/io-pgtable-arm: Unmap and free
table when overwriting with block").

We have implemented a alternate method for tracking when section tables
should be freed.

Change-Id: I84c256ee3a102e37bb55cb852dd869efa7649f21
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
[lmark@codeaurora.org: also remove the iopte_leaf check since this already
 have a check if pte is valid]
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
parent dfb894c5
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -406,21 +406,6 @@ static int arm_lpae_init_pte(struct arm_lpae_io_pgtable *data,
		BUG_ON(!suppress_map_failures);
		return -EEXIST;
	}
	if (iopte_leaf(pte, lvl)) {
		WARN_ON(!selftest_running);
		return -EEXIST;
	} else if (iopte_type(pte, lvl) == ARM_LPAE_PTE_TYPE_TABLE) {
		/*
		 * We need to unmap and free the old table before
		 * overwriting it with a block entry.
		 */
		arm_lpae_iopte *tblp;
		size_t sz = ARM_LPAE_BLOCK_SIZE(lvl, data);

		tblp = ptep - ARM_LPAE_LVL_IDX(iova, lvl, data);
		if (WARN_ON(__arm_lpae_unmap(data, iova, sz, lvl, tblp) != sz))
			return -EINVAL;
	}

	__arm_lpae_init_pte(data, paddr, prot, lvl, ptep, flush);