Slight modification in reaching/freeing of pmds.

This commit is contained in:
Bahadir Balban
2009-05-01 23:12:27 +03:00
parent 97bfd3bb9b
commit 9fbeefadb8

View File

@@ -463,10 +463,12 @@ out_error:
/* Find all allocated pmds and free them */
for (int i = 0; i < PGD_ENTRY_TOTAL; i++) {
if ((pgd->entry[i] & PGD_TYPE_MASK) == PGD_TYPE_COARSE) {
/* Clear coarse indicator from address */
pgd->entry[i] &= ~PGD_TYPE_COARSE;
/* Free pmd by converting to its virtual value first */
free_pmd((void *)phys_to_virt(pgd->entry[i]));
/* Obtain the pmd handle */
pmd = (pmd_table_t *)
phys_to_virt((pgd->entry[i] &
PGD_COARSE_ALIGN_MASK));
/* Free pmd */
free_pmd(pmd);
}
}
/* Free the pgd */