VHE: Fix mm defrag to account for el0 partition's.
This patch adds helper APIs to defrag a partition's page tables that
works on both EL0 partitions and for VMs. Also updated all code using
the mm_vm_defrag API directly to use the newly added vm_ptable_defrag so
that defrag works for EL0 partitions as well.
Change-Id: I93d0d9a2b93e791836561aa813f20a9a65017243
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
diff --git a/src/mm.c b/src/mm.c
index c9c54db..80b6d51 100644
--- a/src/mm.c
+++ b/src/mm.c
@@ -972,6 +972,14 @@
}
/**
+ * Defragments a stage1 page table.
+ */
+void mm_stage1_defrag(struct mm_ptable *t, struct mpool *ppool)
+{
+ mm_ptable_defrag(t, MM_FLAG_STAGE1, ppool);
+}
+
+/**
* Defragments the VM page table.
*/
void mm_vm_defrag(struct mm_ptable *t, struct mpool *ppool)